Deploying a GemFire cluster on a Kubernetes cluster that does not have a default storage class can be done by specifying a
storageClassName for persistentVolumeClaim on the GemFireCluster CRD.
Below is an example:
- List the available StorageClass types available on the Kubernetes cluster:
~/Workspace kubectl get storageclass
NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE
nfs-client cluster.local/nfs-provisioner-nfs-client-provisioner Delete Immediate true 88d
- Patch the nfs-client to be used as the default:
~/Workspace kubectl patch storageclass nfs-client -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'
storageclass.storage.k8s.io/nfs-client patched
- Verify whether it has been set:
~/Workspace kubectl get storageclass
NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE
nfs-client (default) cluster.local/nfs-provisioner-nfs-client-provisioner Delete Immediate true 88d