Upgrading ZooKeeper data store on Linux x86_64

Upgrade the ZooKeeper operator and upgrade the data store.

Note:
When you install Instana for the first time, use Clickhouse-keeper instead of Zookeeper.

Before you begin

Make sure that you prepared your online and offline host to pull images from the external repository. Also, ensure that the correct Helm repo is added.

ZooKeeper operator versions and image tags

The following images are needed for the pinned Helm chart or operator versions.

Platform Operator versions Helm chart version Image with tag
Linux® x86_64 0.2.15 1.0.0

artifact-public.instana.io/self-hosted-images/3rd-party/operator/zookeeper:0.2.15_v0.21.0

artifact-public.instana.io/self-hosted-images/3rd-party/datastore/zookeeper:3.9.3_v0.21.0

artifact-public.instana.io/self-hosted-images/k8s/kubectl:v1.36.2_v0.13.0

Upgrading ZooKeeper online

Complete these steps to upgrading the ZooKeeper data store.

  1. Upgrade the ZooKeeper operator.

    helm upgrade --install zookeeper-operator -n instana-zookeeper instana/zookeeper-operator --set image.repository=artifact-public.instana.io/self-hosted-images/3rd-party/operator/zookeeper --set image.tag=0.2.15_v0.21.0 --set global.imagePullSecrets={"instana-registry"}
     
  2. Update the ZooKeeper cluster resource by applying the following patch.

    kubectl patch zookeepercluster instana-zookeeper -n instana-clickhouse --type=merge --patch '       
    spec:
     image:
      tag: 3.9.3_v0.21.0
         '
     
  3. Complete the steps in Verifying ZooKeeper (online and offline).

Upgrading ZooKeeper offline

If you didn't yet pull the ZooKeeper images from the external registry, you can pull them now. Run the following commands on your bastion host. Then, copy the images to your Instana host that is in your air-gapped environment.

docker pull artifact-public.instana.io/self-hosted-images/3rd-party/operator/zookeeper:0.2.15_v0.21.0
docker pull artifact-public.instana.io/self-hosted-images/3rd-party/datastore/zookeeper:3.9.3_v0.21.0
docker pull artifact-public.instana.io/self-hosted-images/k8s/kubectl:v1.36.2_v0.13.0
         

Complete the following steps on your Instana host.

  1. Retag the images to your internal image registry.

    docker tag artifact-public.instana.io/self-hosted-images/3rd-party/operator/zookeeper:0.2.15_v0.21.0 <internal-image-registry>/operator/zookeeper:0.2.15_v0.21.0
    docker tag artifact-public.instana.io/self-hosted-images/3rd-party/datastore/zookeeper:3.9.3_v0.21.0 <internal-image-registry>/zookeeper:3.9.3_v0.21.0
    docker tag artifact-public.instana.io/self-hosted-images/k8s/kubectl:v1.36.2_v0.13.0 <internal-image-registry>/self-hosted-images/k8s/kubectl:v1.36.2_v0.13.0
                   
  2. Push the images to your internal image registry on your bastion host.

    docker push <internal-image-registry>/operator/zookeeper:0.2.15_v0.21.0
    docker push <internal-image-registry>/zookeeper:3.9.3_v0.21.0
    docker push <internal-image-registry>/self-hosted-images/k8s/kubectl:v1.36.2_v0.13.0
                   
  3. Upgrade the ZooKeeper operator.

    helm upgrade --install zookeeper-operator -n instana-zookeeper zookeeper-operator-1.0.0.tgz --set image.repository=<internal-image-registry>/self-hosted-images/3rd-party/operator/zookeeper --set image.tag=0.2.15_v0.21.0 --set global.imagePullSecrets={"instana-registry"}
     
  4. Update the ZooKeeper cluster resource by applying the following patch.

    kubectl patch zookeepercluster instana-zookeeper -n instana-clickhouse --type=merge --patch '       
    spec:
     image:
       tag: 3.9.3_v0.21.0
          '
     
  5. Complete the steps in Verifying ZooKeeper (online and offline).

Verifying ZooKeeper (online and offline)

Complete these steps to verify ZooKeeper instance and data store.

  1. Verify whether the ZooKeeper operator pod is running.

    kubectl get pods -n instana-zookeeper
     

    Sample output:

    NAME                                          READY   STATUS    RESTARTS   AGE
    instana-zookeeper-operator-7fccd8fd77-9lww5   1/1     Running   0          74s
     

    Verify whether ZooKeeper is working.

    kubectl get all -n instana-zookeeper
     

    See the following sample output.

    NAME                      READY   STATUS    RESTARTS   AGE
    pod/instana-zookeeper-0   1/1     Running   0          119s
    pod/instana-zookeeper-1   1/1     Running   0          82s
    pod/instana-zookeeper-2   1/1     Running   0          47s
    
    NAME                                     TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)                                        AGE
    service/instana-zookeeper-admin-server   ClusterIP   192.168.1.126   <none>        8080/TCP                                       2m
    service/instana-zookeeper-client         ClusterIP   192.168.1.13    <none>        2181/TCP                                       2m
    service/instana-zookeeper-headless       ClusterIP   None            <none>        2181/TCP,2888/TCP,3888/TCP,7000/TCP,8080/TCP   2m
    
    NAME                                 READY   AGE
    statefulset.apps/instana-zookeeper   3/3     2m3s