Upgrade Guide

How to upgrade the Altinity Kubernetes Operator

The Altinity Kubernetes Operator can be upgraded at any time by applying the new manifest from the Altinity Kubernetes Operator GitHub repository.

The following procedures detail how to install a specific version of the Altinity Kubernetes Operator in the default Kubernetes namespace kube-system. For instructions on performing custom installations based on the namespace and other settings, see the Custom Installation Guide.

Requirements

The Altinity Kubernetes Operator for Kubernetes has the following requirements:

Instructions

The following instructions are based on installations of the Altinity Kubernetes Operator greater than version 0.16.0. In the following examples, Altinity Kubernetes Operator version 0.16.0 has been installed and will be upgraded to 0.18.3.

For instructions on installing specific versions of the Altinity Kubernetes Operator, see the Specific Version Installation Guide.

  1. Deploy the Altinity Kubernetes Operator from the manifest directly from GitHub. It is recommended that the version be specified during the installation for maximum compatibilty. In this example, the version being upgraded to is :

    kubectl apply -f https://github.com/Altinity/clickhouse-operator/raw/0.18.3/deploy/operator/clickhouse-operator-install-bundle.yaml
    
  2. The following will be displayed on a successful installation. For more information on the resources created in the installation, see [Altinity Kubernetes Operator Resources]({<ref “operatorresources” >})

    customresourcedefinition.apiextensions.k8s.io/clickhouseinstallations.clickhouse.altinity.com configured
    customresourcedefinition.apiextensions.k8s.io/clickhouseinstallationtemplates.clickhouse.altinity.com configured
    customresourcedefinition.apiextensions.k8s.io/clickhouseoperatorconfigurations.clickhouse.altinity.com configured
    serviceaccount/clickhouse-operator configured
    clusterrole.rbac.authorization.k8s.io/clickhouse-operator-kube-system configured
    clusterrolebinding.rbac.authorization.k8s.io/clickhouse-operator-kube-system configured
    configmap/etc-clickhouse-operator-files configured
    configmap/etc-clickhouse-operator-confd-files configured
    configmap/etc-clickhouse-operator-configd-files configured
    configmap/etc-clickhouse-operator-templatesd-files configured
    configmap/etc-clickhouse-operator-usersd-files configured
    deployment.apps/clickhouse-operator configured
    service/clickhouse-operator-metrics configured
    
  3. Verify the installation by running:

    The following will be displayed on a successful installation, with your particular image:

    kubectl get pods --namespace kube-system
    
    NAME                                   READY   STATUS    RESTARTS       AGE
    clickhouse-operator-857c69ffc6-dqt5l   2/2     Running   0              29s
    coredns-78fcd69978-nthp2               1/1     Running   3 (14d ago)    50d
    etcd-minikube                          1/1     Running   3 (14d ago)    50d
    kube-apiserver-minikube                1/1     Running   3 (2m6s ago)   50d
    kube-controller-manager-minikube       1/1     Running   3 (14d ago)    50d
    kube-proxy-lsggn                       1/1     Running   3 (14d ago)    50d
    kube-scheduler-minikube                1/1     Running   3 (2m6s ago)   50d
    storage-provisioner                    1/1     Running   7 (48s ago)    50d
    
  4. To verify the version of the Altinity Kubernetes Operator, use the following command:

    kubectl get pods -l app=clickhouse-operator -n kube-system -o jsonpath="{.items[*].spec.containers[*].image}" | tr -s "[[:space:]]" | sort | uniq -c
    
    1 altinity/clickhouse-operator:0.18.3 altinity/metrics-exporter:0.18.3