Storage options on IBM Cloud and Red Hat OpenShift
As of 17 July 2025, new automated installations of Red Hat® OpenShift® for VMware® are no longer available for new or existing deployments of VMware Cloud Foundation for Classic - Automated instances. You can still use or delete your existing Red Hat OpenShift for VMware automated installations until 16 July 2026. The service will no longer be available from 17 July 2026.
vSphere storage for Kubernetes
You can use the VMware Cloud Foundation for Classic datastores as a location for storing persistent volumes for Kubernetes by using the VMware® Cloud Provider.
Complete the following steps to create a new volume:
-
From the bastion host, use
govc
to enable the vSphere connection.export GOVC_URL='10.208.17.2' export GOVC_USERNAME='administrator@vsphere.local' export GOVC_PASSWORD='xxx' export GOVC_INSECURE=1 export GOVC_NETWORK='SDDC-DPortGroup-Mgmt' export GOVC_DATASTORE='vsanDatastore'
-
Create a folder on the specified datastore.
govc datastore.mkdir ocp-volumes
-
Create a new persistent volume (vmdk).
govc datastore.disk.create -size 10G volumes/ocp-pv-001.vmdk
-
Log in to your Kubernetes environment from the command line.
oc login
-
Create a persistent volume in Kubernetes, for the recently created vdmk. Replace volumePath with your vmdk, in the example file called vsphere-volume-pv.yaml.
apiVersion: v1 kind: PersistentVolume metadata: name: ocpvsan002 spec: capacity: storage: 10Gi accessModes: - ReadWriteOnce persistentVolumeReclaimPolicy: Retain vsphereVolume: volumePath: "[ESX_OCP] volumes/ocp-pv-001.vmdk" fsType: ext4 storageClassName: "vsphere-standard"
kubectl create -f vsphere-volume-pvc.yaml
-
Create a Persistent Volume Claim in Kubernetes. Replace volumePath with your Persistent Volume name, in the example file called vsphere-volume-pvc.yaml.
apiVersion: "v1" kind: "PersistentVolumeClaim" metadata: name: "pvcvsan002" spec: accessModes: - "ReadWriteOnce" resources: requests: storage: "1Gi" storageClassName: "vsphere-standard" volumeName: "ocpvsan002"
kubectl create -f vsphere-volume-pv.yaml
Now you have a persistent volume claim that can be mapped to the container application.