Scaling and Upgrading 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:Assuming the following is the existing configuration:
apiVersion: hazelcast.com/v1alpha1 kind: Hazelcast metadata: name: hazelcast-sample spec: clusterSize: 3
and you want to scale your deployment to five replicas, you need to apply the following:
apiVersion: hazelcast.com/v1alpha1 kind: Hazelcast metadata: name: hazelcast-sample spec: clusterSize: 5
-
To scale an existing Hazelcast deployment, use the following command:
kubectl scale hazelcast <name> --replicas <replica-count>
Example:
kubectl scale hazelcast hazelcast-sample --replicas 5
Upgrading
Before upgrading, we recommend that you to read Rolling Upgrades information.
To upgrade your existing deployment to a newer version, you need to update spec.version
field and re-apply. For example:
Assuming the following is the existing configuration:
apiVersion: hazelcast.com/v1alpha1
kind: Hazelcast
metadata:
name: hazelcast-sample
spec:
clusterSize: 3
repository: 'docker.io/hazelcast/hazelcast'
version: '5.2.4-slim'
and you want to upgrade your Hazelcast version to 5.4.0, you need to apply the following:
apiVersion: hazelcast.com/v1alpha1
kind: Hazelcast
metadata:
name: hazelcast-sample
spec:
clusterSize: 3
repository: 'docker.io/hazelcast/hazelcast'
version: '5.4.0-slim'
Each Operator version has been tested and validated to work correctly with a specific Hazelcast version. You can find the test matrix below. We highly recommend you to consider it to avoid issues during Operator installations.
Operator Version | Hazelcast Version |
---|---|
5.5 |
5.1.4 |
5.6 |
5.2.1 |
5.7 |
5.2.3 |
5.8 |
5.3.1 |
5.9 |
5.3.2 |
5.10 |
5.3.5 |
5.11 |
5.4.0 |
5.12 |
5.4.0 |
5.13 |
5.5.0 |
5.14 |
5.5.2 |