To scale an existing Hazelcast deployment, there are two options:
-
Modify the YAML definition you used to deploy Hazelcast cluster by updating
clusterSizefield 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: 3You can scale your deployment to five replicas by updating the
clusterSizefield 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
scalecommand:kubectl scale hazelcast <name> --replicas <replica-count>For example:
kubectl scale hazelcast hazelcast-sample --replicas 5