ConfigMap and Storage Class YAML to create a local SSD Storage Class
These instructions will configure and enable a local storage class in OpenShift 3.11. This allows for an SSD EBS volume to be attached to the node and mounted directly by pods on that node
- OpenShift Cluster
- OC command line tool
Make sure the EBS volume is mounted to the host in the right path
/mnt/local-storage/ssd/disk#
Change the SELinux labels so OCP can see the new EBS volume
chcon -R unconfined_u:object_r:svirt_sandbox_file_t:s0 /mnt/local-storage/
oc new-project local-storage
oc create serviceaccount local-storage-admin
oc adm policy add-scc-to-user privileged -z local-storage-admin
oc create -f https://raw.githubusercontent.com/openshift/origin/release-3.11/examples/storage-examples/local-examples/local-storage-provisioner-template.yaml
oc create -f https://gist.githubusercontent.com/dmc5179/b5d06b8149581e12374284fb3b9c3866/raw/eca531d06334510e0364c8014d94d7b466bfc9a5/local_volume_configmap.yaml
oc new-app -p CONFIGMAP=local-volume-config -p SERVICE_ACCOUNT=local-storage-admin -p NAMESPACE=local-storage -p PROVISIONER_IMAGE=registry.redhat.io/openshift3/local-storage-provisioner:v3.11 local-storage-provisioner
oc create -f https://gist.githubusercontent.com/dmc5179/b5d06b8149581e12374284fb3b9c3866/raw/eca531d06334510e0364c8014d94d7b466bfc9a5/storage-class-ssd.yaml