This is a prerelease version.

View latest

Scale a Hazelcast deployment

To scale an existing Hazelcast deployment, there are two options:

  • Modify the YAML definition you used to deploy Hazelcast cluster by updating clusterSize field and re-apply it again:

    For example, if the existing configuration has a cluster size of three:

    apiVersion: hazelcast.com/v1alpha1
    kind: Hazelcast
    metadata:
      name: hazelcast-sample
    spec:
      clusterSize: 3

    You can scale your deployment to five replicas by updating the clusterSize field and applying:

    apiVersion: hazelcast.com/v1alpha1
    kind: Hazelcast
    metadata:
      name: hazelcast-sample
    spec:
      clusterSize: 5
For Kubernetes
kubectl apply -f hazelcast-sample.yaml

+ .For Openshift

oc apply -f hazelcast-sample.yaml
  • Alternatively, you can use the scale command:

    kubectl scale hazelcast <name> --replicas <replica-count>

    For example:

    kubectl scale hazelcast hazelcast-sample --replicas 5

Check the cluster status

You can check that the operation has completed by checking the cluster status:

  • Kubernetes

  • Openshift

kubectl get hazelcast
oc get hazelcast
NAME               STATUS    MEMBERS
hazelcast-sample   Running   5/5