Upgrading the Operator

How to move to a different version of the Altinity Kubernetes Operator for ClickHouse®

The Altinity Kubernetes Operator for ClickHouse® can be upgraded at any time by applying a new manifest from the operator's repository.

NOTE: These instructions assume you installed the operator into the default kube-system namespace. If you installed it somewhere else, obviously use your chosen namespace instead.

Instructions

In the following example, the currently installed version will be upgraded to 0.24.5.

Deploy the Altinity Kubernetes Operator for ClickHouse from the operator’s repo. This command upgrades the installed version to 0.24.5:

kubectl apply -f https://raw.githubusercontent.com/Altinity/clickhouse-operator/release-0.24.5/deploy/operator/clickhouse-operator-install-bundle.yaml

You’ll see something like this (there may be slight variations depending on the version you’re installing):

customresourcedefinition.apiextensions.k8s.io/clickhouseinstallations.clickhouse.altinity.com created
customresourcedefinition.apiextensions.k8s.io/clickhouseinstallationtemplates.clickhouse.altinity.com created
customresourcedefinition.apiextensions.k8s.io/clickhouseoperatorconfigurations.clickhouse.altinity.com created
customresourcedefinition.apiextensions.k8s.io/clickhousekeeperinstallations.clickhouse-keeper.altinity.com created
serviceaccount/clickhouse-operator created
clusterrole.rbac.authorization.k8s.io/clickhouse-operator-kube-system created
clusterrolebinding.rbac.authorization.k8s.io/clickhouse-operator-kube-system created
configmap/etc-clickhouse-operator-files created
configmap/etc-clickhouse-operator-confd-files created
configmap/etc-clickhouse-operator-configd-files created
configmap/etc-clickhouse-operator-templatesd-files created
configmap/etc-clickhouse-operator-usersd-files created
configmap/etc-keeper-operator-confd-files created
configmap/etc-keeper-operator-configd-files created
configmap/etc-keeper-operator-templatesd-files created
configmap/etc-keeper-operator-usersd-files created
secret/clickhouse-operator created
deployment.apps/clickhouse-operator created
service/clickhouse-operator-metrics created

Verify the installation by running:

kubectl get pods -l app=clickhouse-operator -n kube-system -o jsonpath="{.items[*].spec.containers[*].image}" | tr ' ' '\n' | grep -v 'metrics-exporter' | sort -u

You’ll see the currently installed version of the operator:

altinity/clickhouse-operator:0.24.5