Upgrade Guide

How to upgrade the clickhouse-operator

The clickhouse-operator can be upgraded at any time by applying the new manifest from the clickhouse-operator GitHub repository.

The following procedures detail how to install a specific version of the clickhouse-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 clickhouse-operator for Kubernetes has the following requirements:

Instructions

The following instructions are based on installations of the clickhouse-operator greater than version 0.16.0. In the following examples, clickhouse-operator version 0.16.0 has been installed and will be upgraded to the most current version.

For instructions on installing specific versions of the clickhouse-operator, see the Specific Version Installation Guide.

  1. Deploy the clickhouse-operator from the manifest directly from GitHub. This insures the most current version is installed:

    kubectl apply -f https://raw.githubusercontent.com/Altinity/clickhouse-operator/master/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 [clickhouse-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-6fd75cbd68-v9h2v   2/2     Running   0              6s
    coredns-78fcd69978-cxghc               1/1     Running   1 (118m ago)   3d2h
    etcd-minikube                          1/1     Running   1 (118m ago)   3d2h
    kube-apiserver-minikube                1/1     Running   1 (118m ago)   3d2h
    kube-controller-manager-minikube       1/1     Running   1 (118m ago)   3d2h
    kube-proxy-g84s6                       1/1     Running   1 (118m ago)   3d2h
    kube-scheduler-minikube                1/1     Running   1 (118m ago)   3d2h
    storage-provisioner                    1/1     Running   3 (117m ago)   3d2h
    
  4. To verify the version of the clickhouse-operator, use the following command:

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

Last modified 2021.12.22: Version install and upgrades.