This version defines a Tanzu GemFire Operator to use when creating a Tanzu GemFire cluster. See Operator pattern.

A Tanzu GemFire Operator uses a Helm chart and Docker images to define the Tanzu GemFire cluster.

Install the Operator

  1. Verify your current Kubernetes cluster:

    $ kubectl config current-context
  2. Create a namespace called gemfire-system to be used for the Tanzu GemFire cluster operator:

    $ kubectl create namespace gemfire-system
  3. Create an image pull secret for the Kubernetes cluster namespace. Set the user name (USERNAME) and password (PASSWD) credentials to have values that have permission to access VMware Tanzu Network, as they will be used to acquire the operator image from the registry.

    kubectl create secret docker-registry image-pull-secret --namespace=gemfire-system --docker-username='USERNAME' --docker-password='PASSWD'

    where your USERNAME and user’s PASSWD are set.

    Surround both the USERNAME and the PASSWD by single quote marks to ensure that special characters within those values are handled correctly.

  4. If you are using Tanzu Kubernetes Grid (TKG) as your Kubernetes platform, create a role binding within the gemfire-system namespace, such that pods can be created under the pod security policy that will be configured for your TKG platform:

    $ kubectl create rolebinding psp-gemfire --namespace=gemfire-system \
    --clusterrole=psp:vmware-system-privileged --serviceaccount=gemfire-system:default
  5. Complete the operator installation in one of two ways:

    • Use helm to acquire and then install the operator.

      $ export HELM_EXPERIMENTAL_OCI=1
      $ helm registry login -u myuser
        Login succeeded
      $ helm chart pull
      $ helm chart export
      $ helm install gemfire-operator gemfire-operator --namespace gemfire-system
    • Download the compressed TAR file for the operator from VMware Tanzu Network. It is gemfire-operator-1.0.1.tgz.

      Use helm to install the operator.

      $ helm install gemfire-operator gemfire-operator-1.0.1.tgz --namespace gemfire-system
  6. Verify that the Tanzu GemFire operator is successfully deployed:

    $ helm ls --namespace gemfire-system

    A successfully deployed operator will output:

    $ helm ls --namespace gemfire-system
    NAME              NAMESPACE       STATUS      
    gemfire-operator  gemfire-system  deployed

Uninstall the Operator

  1. Delete all Tanzu GemFire clusters prior to uninstalling the operator, as described in Delete a Tanzu GemFire Cluster.

  2. Use helm to uninstall the Tanzu GemFire Operator:

    $ helm uninstall gemfire-operator --namespace gemfire-system

    This command will also destroy all Tanzu GemFire clusters created with the Tanzu GemFire Operator. However, it may not complete the operation, leaving pods forever in the terminating state. Any remaining pods may interfere with future installations, so destroy the pods.

    Discover any remaining pods:

    $ kubectl get pods
    NAME                READY   STATUS        RESTARTS   AGE
    gemfire1-server-0   1/1     Terminating   0          29m
    gemfire1-server-1   1/1     Terminating   0          29m

    For each remaining pod, delete it with the two-command sequence:

    kubectl patch pod POD-NAME -p '{"metadata":{"finalizers":null}}'
    kubectl delete pod POD-NAME --grace-period=0 --force

    where POD-NAME with the pod's name, as listed in the kubectl get pods command.

    Also remove any persistent volume claims as instructed in Delete a Tanzu GemFire Cluster.

  3. Delete the CRD for a cluster:

    $ kubectl delete crd
check-circle-line exclamation-circle-line close-line
Scroll to top icon