Specific Version Installation Guide

How to install a specific version of the clickhouse-operator

Users may want to install a specific version of the clickhouse-operator for a variety of reasons: to maintain parity between different environments, to preserve the version between replicas, or other reasons.

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

clickhouse-operator Versions After 0.16.0

To install a specific version of the clickhouse-operator after version 0.16.0`:

  1. Run kubectl and apply the manifest directly from the GitHub clickhouse-operator repository, or by downloading the manifest and applying it directly. The format for the URL is:

    https://github.com/Altinity/clickhouse-operator/raw/{operator_version}/deploy/operator/clickhouse-operator-install-bundle.yaml
    

    Replace the {operator_version} with the version to install. For example, for clickhouse-operator version 0.17.0, the URL would be:

    https://github.com/Altinity/clickhouse-operator/raw/0.16.0/deploy/operator/clickhouse-operator-install-bundle.yaml

    The command to apply the Docker manifest through kubectl is:

    kubectl apply -f https://github.com/Altinity/clickhouse-operator/raw/0.16.0/deploy/operator/clickhouse-operator-install-bundle.yaml
    
    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
    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
    deployment.apps/clickhouse-operator created
    service/clickhouse-operator-metrics created
    
  2. Verify the installation is complete and the clickhouse-operator pod is running:

    kubectl get pods --namespace kube-system
    

    A similar result to the following will be displayed on a successful installation:

    NAME                                  READY   STATUS    RESTARTS      AGE
    clickhouse-operator-55dcf7f88-vfss2   2/2     Running   0             5s
    coredns-78fcd69978-cxghc              1/1     Running   1 (47m ago)   3d1h
    etcd-minikube                         1/1     Running   1 (47m ago)   3d1h
    kube-apiserver-minikube               1/1     Running   1 (47m ago)   3d1h
    kube-controller-manager-minikube      1/1     Running   1 (47m ago)   3d1h
    kube-proxy-g84s6                      1/1     Running   1 (47m ago)   3d1h
    kube-scheduler-minikube               1/1     Running   1 (47m ago)   3d1h
    storage-provisioner                   1/1     Running   3 (46m ago)   3d1h
    
  3. 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.16.0 altinity/metrics-exporter:0.16.0
    

Last modified 2021.12.22: Version install and upgrades.