...
Upgrade hivemq version without downtime. Hivemq version 4.6.4 should be running without error using k8s operator version 0.9.2
Steps to follow:
Hivemq cluster values Example of hivemq-cluster.yaml file:
Code Block |
---|
apiVersion: hivemq.com/v1 kind: HiveMQCluster metadata: name: hivemq-dev spec: env: - name: TEST_ENV value: 'set' |
Example of HiveMQ operator values.yaml file:
Code Block | ||
---|---|---|
| ||
monitoring: enabled: true operator: admissionWebhooks: enabled: false failurePolicy: Fail deployCr: false logLevel: DEBUG |
Deploy Hivemq operator with 0.8.7
Code Block language bash helm upgrade --version 0.8.7 --install -f operator.yaml <release name> hivemq/hivemq-operator
Apply Hivemq cluster with hivemq 4.6.2
Code Block language bash kubectl apply -f <hivemq -cluster.yaml>
Simply apply the new CRD using the following command (considering k8s version is 1.16+)
Note: This step can be skipped if you are using BladeCenter.Code Block language bash kubectl apply -f https://raw.githubusercontent.com/hivemq/helm-charts/prerelease-4.6.4/charts/hivemq-operator/crds/hivemq-cluster.yaml
Scale operator to 0 so it doesn’t immediately reconcile. This will only remove the operator pod, but leave the HiveMQ nodes as remaining
Code Block kubectl scale —replicas=0 deployment <operator name>
Edit hivemq cluster yaml to update the hivemq version as 4.6.4
Apply the changes
Code Block Kubectl apply -f <hivemq cluster.yaml>
check the pods status(no errors)
Code Block kubectl get pods
Update operator version i.e 0.9.2 in the cluster(operator config File or command line)
Run the following command for a rolling upgrade
Code Block helm upgrade --version 0.9.2 --install -f operator.yaml <release name> hivemq/hivemq-operator
Related articles
Filter by label (Content by label) | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|