Container Storage Interface driver for vSphere 6.x 7.x and OpenShift Container Platform 4.x


Container Storage Interface (CSI) driver for vSphere 6.x/7.x and OpenShift Container Platform 4.x

This repository provides scripts for deploying the vSphere CSI provider on an OCP environment.

This repo was updated in February 2022 to follow the latest manifests. VMware released official support for OpenShift in their public repository with the CSI Driver version 2.1.0, so my instructions now reference their manifests.

Thank you to Myles Gray, Sandeep Pissay and the VMware team for working on this support.


Please read the prerequisites from the official documentation.

  • Requires OCP virtual machines to be virtual hardware v15 or above.

To create the vCenter roles you can use this script; 
  1. Edit csi-vsphere.conf + vsphere.conf files with your environment details.
  2. Create a Kubernetes secret + configmap that will contain configuration details to connect to vSphere for both the CSI Driver and the Cloud Provider Interface.
   oc create secret generic vsphere-config-secret --from-file=csi-vsphere.conf --namespace=kube-system
   oc create configmap cloud-config --from-file=vsphere.conf --namespace=kube-system
  1. Taint all OpenShift nodes
   Command: kubectl taint nodes --all ''
  1. Install the CPI (RBAC, Bindings and DaemonSet)
   oc apply -f
   oc apply -f
   oc apply -f
  1. Install the CSI

The below installation is based on the CSI version 2.4.0. Please see the official repository for alternative versions for further Kubernetes version support.

# Taint the Control Plane nodes
kubectl taint nodes <k8s-primary-name>

# Create the namespace
oc apply -f

# Install the CSI
oc apply -f


Official documentation for vSphere CSI Driver is available here:

All install manifests referenced can be found here:

Older Resources

You can read my [legacy] complete blogs here, please use with caution as some items might have changed!!!:

Sign in to be able to add comments.

Comments 0