How can a GemFire cluster be deployed on a Kubernetes cluster that doesn’t have a default StorageClass?
search cancel

How can a GemFire cluster be deployed on a Kubernetes cluster that doesn’t have a default StorageClass?

book

Article ID: 294305

calendar_today

Updated On:

Products

VMware Tanzu Gemfire

Issue/Introduction

A GemFire cluster needs a storage class on a Kubernetes cluster to be deployed. Without a storage class, a GemFire cluster can not be deployed.

Environment

Product Version: 1.0

Resolution

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:
 
  1. 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
  2. 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
  3. 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