The following are the supported orchestration platforms suitable for deployment for IBM VPC file CSI Driver.
Orchestration platform | Version | Architecture |
---|---|---|
Red Hat® OpenShift® | 4.6 | x86 |
Red Hat® OpenShift® | 4.7 | x86 |
Red Hat® OpenShift® | 4.8 | x86 |
Red Hat® OpenShift® | 4.9 | x86 |
Kubernetes | 1.21 | x86 |
Kubernetes | 1.22 | x86 |
Kubernetes | 1.23 | x86 |
Following are the prerequisites to use the IBM VPC file CSI Driver:
- User should have either Red Hat® OpenShift® or kubernetes cluster on IBM VPC Gen 2 infrastructure.
- Should have compatible orchestration platform.
- Install and configure
ibmcloud is
CLI or get the required worker/node details by usingIBM Cloud Console
- Cluster's worker node should have following labels, if not please apply labels before deploying IBM VPC file CSI Driver.
"failure-domain.beta.kubernetes.io/region"
"failure-domain.beta.kubernetes.io/zone"
"topology.kubernetes.io/region"
"topology.kubernetes.io/zone"
"ibm-cloud.kubernetes.io/vpc-instance-id"
"ibm-cloud.kubernetes.io/worker-id"
For building the driver docker
and GO
should be installed on the system
-
GO version should be >=1.18
-
Set the
GOPATH
environment variable. -
Build the driver image
$ mkdir -p $GOPATH/src/github.com/IBM $ cd $GOPATH/src/github.com/IBM/ $ git clone https://github.com/IBM/ibm-vpc-file-csi-driver.git $ cd ibm-vpc-file-csi-driver
$ make
$ make buildimage
Image should be pushed to any registry from which cluster worker nodes have access to pull
You can push the driver image to docker.io registry or IBM public registry under your namespace.
For pushing to IBM registry:
Create an image pull secret in your cluster
-
ibmcloud login to the target region
-
Run -
ibmcloud cr region-set global
-
Run -
ibmcloud cr login
-
Run -
ibmcloud ks cluster config --cluster \<cluster-name\> --admin
-
Review and retrieve the following values for your image pull secret.
<docker-username>
- Enter the string:iamapikey
.<docker-password>
- Enter your IAM API key. For more information about IAM API keys, see Understanding API keys .<docker-email>
- Enter the string: iamapikey. -
Run the following command to create the image pull secret in your cluster. Note that your secret must be named
icr-io-secret
kubectl create secret docker-registry icr-io-secret --docker-server=icr.io --docker-username=iamapikey --docker-password=-<iam-api-key> --docker-email=iamapikey -n kube-system
-
IBM VPC endpoints which supports Gen2 is documented here
- Install
kustomize
tool. The instructions are available here - Export cluster config i.e configuring kubectl command
- Deploy IBM VPC file CSI Driver on your cluster
-
You can use any overlays available under
deploy/kubernetes/driver/kubernetes/overlays/
and edit the image tag if you want to use your own build image from this source code, although defualt overalys are already using released IBM VPC file CSI Driver image -
Example using
stage
overlay to update the image tag- Change
iks-vpc-file-driver
image name indeploy/kubernetes/driver/kubernetes/overlays/stage/controller-server-images.yaml
- Change
iks-vpc-file-driver
image name indeploy/kubernetes/driver/kubernetes/overlays/stage/node-server-images.yaml
- Change
-
Deploy plugin
bash deploy/kubernetes/driver/kubernetes/deploy-vpc-file-driver.sh stage
-
- Create storage classes
ls deploy/kubernetes/storageclass/ | xargs -I classfile kubectl apply -f deploy/kubernetes/storageclass/classfile
- Create PVC
kubectl create -f examples/kubernetes/validPVC.yaml
- Create POD with volume
kubectl create -f examples/kubernetes/validPOD.yaml
- Delete plugin
bash deploy/kubernetes/driver/kubernetes/delete-vpc-csi-driver.sh stage
TBD
If you have any questions or issues you can create a new issue here.
Pull requests are very welcome! Make sure your patches are well tested. Ideally create a topic branch for every separate change you make. For example:
-
Fork the repo
-
Create your feature branch (git checkout -b my-new-feature)
-
Commit your changes (git commit -am 'Added some feature')
-
Push to the branch (git push origin my-new-feature)
-
Create new Pull Request
-
Add the test results in the PR
- Dynamic PVC/PV creation and deletion with ReadWriteMany capability
- POD creation and deletion which will mount/unmount the file storage volumes.
- Defining custom storage class by providing gid/uid will allow non-root users access to file storage volumes.
https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-vpc-about