|
| 1 | +# Installing the Projected Resource CSI driver |
| 2 | + |
| 3 | +## Before you begin |
| 4 | + |
| 5 | +1. You must have an OpenShift cluster running 4.8 or later. |
| 6 | + |
| 7 | +1. Grant `cluster-admin` permissions to the current user. |
| 8 | + |
| 9 | +## Installing from a local clone of this repository (only developer preview level support) |
| 10 | + |
| 11 | +1. Run the following command |
| 12 | + |
| 13 | +```bash |
| 14 | +# change directories into you clone of this repository, then |
| 15 | +./deploy/deploy.sh |
| 16 | +``` |
| 17 | + |
| 18 | +You should see an output similar to the following printed on the terminal showing the creation or modification of the various |
| 19 | +Kubernetes resource: |
| 20 | + |
| 21 | +```shell |
| 22 | +deploying hostpath components |
| 23 | + ./deploy/0000_10_projectedresource.crd.yaml |
| 24 | +oc apply -f ./deploy/0000_10_projectedresource.crd.yaml |
| 25 | +customresourcedefinition.apiextensions.k8s.io/shares.projectedresource.storage.openshift.io created |
| 26 | + ./deploy/00-namespace.yaml |
| 27 | +oc apply -f ./deploy/00-namespace.yaml |
| 28 | +namespace/csi-driver-projected-resource created |
| 29 | + ./deploy/01-service-account.yaml |
| 30 | +oc apply -f ./deploy/01-service-account.yaml |
| 31 | +serviceaccount/csi-driver-projected-resource-plugin created |
| 32 | + ./deploy/02-cluster-role.yaml |
| 33 | +oc apply -f ./deploy/02-cluster-role.yaml |
| 34 | +clusterrole.rbac.authorization.k8s.io/projected-resource-secret-configmap-share-watch-sar-create created |
| 35 | + ./deploy/03-cluster-role-binding.yaml |
| 36 | +oc apply -f ./deploy/03-cluster-role-binding.yaml |
| 37 | +clusterrolebinding.rbac.authorization.k8s.io/projected-resource-privileged unchanged |
| 38 | +clusterrolebinding.rbac.authorization.k8s.io/projected-resource-secret-configmap-share-watch-sar-create unchanged |
| 39 | + ./deploy/csi-hostpath-driverinfo.yaml |
| 40 | +oc apply -f ./deploy/csi-hostpath-driverinfo.yaml |
| 41 | +csidriver.storage.k8s.io/csi-driver-projected-resource.openshift.io created |
| 42 | + ./deploy/csi-hostpath-plugin.yaml |
| 43 | +oc apply -f ./deploy/csi-hostpath-plugin.yaml |
| 44 | +service/csi-hostpathplugin created |
| 45 | +daemonset.apps/csi-hostpathplugin created |
| 46 | +16:21:25 waiting for hostpath deployment to complete, attempt #0 |
| 47 | +``` |
| 48 | + |
| 49 | +## Installing from the master branch of this repository (only developer preview level support) |
| 50 | + |
| 51 | +1. Run the following command |
| 52 | + |
| 53 | +```bash |
| 54 | +oc apply -f --filename https://raw.githubusercontent.com/openshift/csi-driver-projected-resource/master/deploy/00-namespace.yaml |
| 55 | +oc apply -f --filename https://raw.githubusercontent.com/openshift/csi-driver-projected-resource/master/deploy/0000_10_projectedresource.crd.yaml |
| 56 | +oc apply -f --filename https://raw.githubusercontent.com/openshift/csi-driver-projected-resource/master/deploy/01-service-account.yaml |
| 57 | +oc apply -f --filename https://raw.githubusercontent.com/openshift/csi-driver-projected-resource/master/deploy/02-cluster-role.yaml |
| 58 | +oc apply -f --filename https://raw.githubusercontent.com/openshift/csi-driver-projected-resource/master/deploy/03-cluster-role-binding.yaml |
| 59 | +oc apply -f --filename https://raw.githubusercontent.com/openshift/csi-driver-projected-resource/master/deploy/csi-hostpath-driverinfo.yaml |
| 60 | +oc apply -f --filename https://raw.githubusercontent.com/openshift/csi-driver-projected-resource/master/deploy/csi-hostpath-plugin.yaml |
| 61 | +``` |
| 62 | + |
| 63 | +You should see an output similar to the following printed on the terminal showing the creation or modification of the various |
| 64 | +Kubernetes resource: |
| 65 | + |
| 66 | +```shell |
| 67 | +namespace/csi-driver-projected-resource created |
| 68 | +customresourcedefinition.apiextensions.k8s.io/shares.projectedresource.storage.openshift.io created |
| 69 | +serviceaccount/csi-driver-projected-resource-plugin created |
| 70 | +clusterrole.rbac.authorization.k8s.io/projected-resource-secret-configmap-share-watch-sar-create created |
| 71 | +clusterrolebinding.rbac.authorization.k8s.io/projected-resource-privileged created |
| 72 | +clusterrolebinding.rbac.authorization.k8s.io/projected-resource-secret-configmap-share-watch-sar-create created |
| 73 | +csidriver.storage.k8s.io/csi-driver-projected-resource.openshift.io created |
| 74 | +service/csi-hostpathplugin created |
| 75 | +daemonset.apps/csi-hostpathplugin created |
| 76 | +``` |
| 77 | + |
| 78 | + |
| 79 | +## Installing from a release specific branch of this repository (only developer preview level support) |
| 80 | + |
| 81 | +1. Run the following command |
| 82 | + |
| 83 | +```bash |
| 84 | +oc apply -f --filename https://raw.githubusercontent.com/openshift/csi-driver-projected-resource/release-4.8/deploy/00-namespace.yaml |
| 85 | +oc apply -f --filename https://raw.githubusercontent.com/openshift/csi-driver-projected-resource/release-4.8/deploy/0000_10_projectedresource.crd.yaml |
| 86 | +oc apply -f --filename https://raw.githubusercontent.com/openshift/csi-driver-projected-resource/release-4.8/deploy/01-service-account.yaml |
| 87 | +oc apply -f --filename https://raw.githubusercontent.com/openshift/csi-driver-projected-resource/release-4.8/deploy/02-cluster-role.yaml |
| 88 | +oc apply -f --filename https://raw.githubusercontent.com/openshift/csi-driver-projected-resource/release-4.8/deploy/03-cluster-role-binding.yaml |
| 89 | +oc apply -f --filename https://raw.githubusercontent.com/openshift/csi-driver-projected-resource/release-4.8/deploy/csi-hostpath-driverinfo.yaml |
| 90 | +oc apply -f --filename https://raw.githubusercontent.com/openshift/csi-driver-projected-resource/release-4.8/deploy/csi-hostpath-plugin.yaml |
| 91 | +``` |
| 92 | + |
| 93 | +You should see an output similar to the following printed on the terminal showing the creation or modification of the various |
| 94 | +Kubernetes resource: |
| 95 | + |
| 96 | +```shell |
| 97 | +namespace/csi-driver-projected-resource created |
| 98 | +customresourcedefinition.apiextensions.k8s.io/shares.projectedresource.storage.openshift.io created |
| 99 | +serviceaccount/csi-driver-projected-resource-plugin created |
| 100 | +clusterrole.rbac.authorization.k8s.io/projected-resource-secret-configmap-share-watch-sar-create created |
| 101 | +clusterrolebinding.rbac.authorization.k8s.io/projected-resource-privileged created |
| 102 | +clusterrolebinding.rbac.authorization.k8s.io/projected-resource-secret-configmap-share-watch-sar-create created |
| 103 | +csidriver.storage.k8s.io/csi-driver-projected-resource.openshift.io created |
| 104 | +service/csi-hostpathplugin created |
| 105 | +daemonset.apps/csi-hostpathplugin created |
| 106 | +``` |
| 107 | + |
| 108 | + |
| 109 | +## Installing from the release page (only developer preview level support) |
| 110 | + |
| 111 | +1. Run the following command |
| 112 | + |
| 113 | +```bash |
| 114 | +oc apply -f --filename https://github.com/openshift/csi-driver-projected-resource/releases/download/v0.1.0/release.yaml |
| 115 | +``` |
| 116 | + |
| 117 | +You should see an output similar to the following printed on the terminal showing the creation or modification of the various |
| 118 | +Kubernetes resource: |
| 119 | + |
| 120 | +```shell |
| 121 | +namespace/csi-driver-projected-resource created |
| 122 | +customresourcedefinition.apiextensions.k8s.io/shares.projectedresource.storage.openshift.io created |
| 123 | +serviceaccount/csi-driver-projected-resource-plugin created |
| 124 | +clusterrole.rbac.authorization.k8s.io/projected-resource-secret-configmap-share-watch-sar-create created |
| 125 | +clusterrolebinding.rbac.authorization.k8s.io/projected-resource-privileged created |
| 126 | +clusterrolebinding.rbac.authorization.k8s.io/projected-resource-secret-configmap-share-watch-sar-create created |
| 127 | +csidriver.storage.k8s.io/csi-driver-projected-resource.openshift.io created |
| 128 | +service/csi-hostpathplugin created |
| 129 | +daemonset.apps/csi-hostpathplugin created |
| 130 | +``` |
| 131 | + |
| 132 | + |
| 133 | +## Validate the installation |
| 134 | + |
| 135 | +First, let's validate the deployment. Ensure all expected pods are running for the driver plugin, which in a |
| 136 | +3 node OCP cluster will look something like: |
| 137 | + |
| 138 | +```shell |
| 139 | +$ oc get pods -n csi-driver-projected-resource |
| 140 | +NAME READY STATUS RESTARTS AGE |
| 141 | +csi-hostpathplugin-c7bbk 2/2 Running 0 23m |
| 142 | +csi-hostpathplugin-m4smv 2/2 Running 0 23m |
| 143 | +csi-hostpathplugin-x9xjw 2/2 Running 0 23m |
| 144 | +``` |
0 commit comments