Upgrade a Tanzu GemFire Cluster

Follow the steps below to upgrade a Tanzu GemFire cluster to a newer version of GemFire.

  1. In the Custom Resource Definition (CRD) YAML file that describes the cluster, replace the existing value for image with the image for the newer version of GemFire. For example:

    apiVersion: gemfire.vmware.com/v1
    kind: GemFireCluster
    metadata:
      name: gemfirecluster-sample
    spec:
      image: registry.tanzu.vmware.com/pivotal-gemfire/vmware-gemfire:9.15.0
    
  2. Apply the changes to the CRD:

    kubectl -n NAMESPACE-NAME apply -f CLUSTER-CRD-YAML
    

    Where:

    • NAMESPACE-NAME is the name of the Tanzu GemFire cluster namespace
    • CLUSTER-CRD-YAML is the filename of the CRD.

After applying the changes, the Tanzu GemFire Operator upgrades the Tanzu GemFire cluster to the newer version of GemFire specified in the CRD.

Apply Changes to the Tanzu GemFire Cluster

Once a Tanzu GemFire cluster has been created, the Tanzu GemFire cluster may be altered by applying an updated CRD. Applying the altered CRD will cause a rolling update of the pods in the Tanzu GemFire cluster. The rolling update restarts each locator and server in the Tanzu GemFire cluster, one at a time.

  1. Modify and save the updated YAML file that contains the cluster’s CRD configuration.
  2. Apply the changes with a command of the form:

    kubectl -n NAMESPACE-NAME apply -f CLUSTER-CRD-YAML
    

    Where:

    • NAMESPACE-NAME is your chosen name for the Tanzu GemFire cluster namespace.
    • CLUSTER-CRD-YAML is the file name of the file containing the YAML that represents the Tanzu GemFire cluster’s CRD.

    As a result of applying the changes, the Tanzu GemFire Operator will bring the state of the Tanzu GemFire cluster to that specified in the YAML file.

Scale the Tanzu GemFire Cluster

Scale the Tanzu GemFire cluster by increasing or decreasing the quantity of servers. Locators may not be scaled after a Tanzu GemFire cluster has been created. Before decreasing the quantity of servers, ensure that the cluster will have sufficient resources to host the data.

Edit the YAML file that contains the cluster’s CRD configuration. Change the spec: servers: replicas value to the desired quantity of servers to be running in the scaled Tanzu GemFire cluster.

Apply the change as described in Apply Changes to the Tanzu GemFire Cluster.

To check the status of the Tanzu GemFire cluster:

kubectl -n NAMESPACE-NAME get GemFireClusters

Where NAMESPACE-NAME is your chosen name for the Tanzu GemFire cluster namespace.

For example, if the NAMESPACE-NAME is gemfire-cluster:

$ kubectl -n gemfire-cluster get GemFireClusters
NAME       LOCATORS   SERVERS
gemfire1   2/2        2/3

The first number identifies how many of the replicas are running. The second number identifies how many replicas are specified. When the quantity running reaches the number of replicas specified for servers, scaling is complete.

Pause Reconciliation for the Tanzu GemFire Cluster

To pause reconciliation, set a special annotation “gemfire.vmware.com/pause-reconciliation=true” on your Tanzu GemFire cluster.

Please be aware that pausing reconciliation means that the operator will not watch this Tanzu GemFire cluster until the special annotation is removed. Any updates to the paused Tanzu GemFire cluster will be ignored by the operator, and if you accidentally delete a child resource of the Tanzu GemFire cluster (e.g. the Stateful Set or Service object), the deleted resource will not be recreated automatically.

To pause reconciliation, set the annotation by running:

kubectl annotate gemfireclusters INSTANCE-NAME gemfire.vmware.com/pause-reconciliation=true -n NAMESPACE-NAME

Where INSTANCE-NAME is the name of your Tanzu GemFire cluster.

To resume reconciliation, remove the label by running:

kubectl annotate gemfireclusters INSTANCE-NAME gemfire.vmware.com/pause-reconciliation- -n NAMESPACE-NAME
check-circle-line exclamation-circle-line close-line
Scroll to top icon