Skip to content
Vector database engineering on Kubernetes · Chapter 16 of 20 Day 15: GitOps and upgrades – the approved plan

Day 15: GitOps and upgrades – the approved plan

Goal: put Qdrant under the supervision of Argo CD without data loss, detect drift and have it reverted, roll out changes and upgrades via Git, roll back a failed upgrade and know the limits of a rollback · Duration: about 150 min · Prerequisite: Day 0 to Day 14

State before this chapter

Three Qdrant pods are running with TLS, API keys, NetworkPolicies and Pod Security restricted, installed with Helm (revision 21). Monitoring (Day 11) and the off-site store (Day 12) are in place on vdb1. Milvus from Day 14 has been taken down again.

# on vdb1
kubectl -n qdrant get pods -o wide

Expected (your IPs, nodes and ages will differ):

NAME       READY   STATUS    RESTARTS   AGE     IP           NODE   NOMINATED NODE   READINESS GATES
qdrant-0   1/1     Running   0          4h26m   10.42.1.61   vdb2   <none>           <none>
qdrant-1   1/1     Running   0          4h27m   10.42.3.8    vdb4   <none>           <none>
qdrant-2   1/1     Running   0          4h28m   10.42.2.18   vdb3   <none>           <none>

All commands run on vdb1 in the folder ~/labor/tag15:

# on vdb1
mkdir -p ~/labor/tag15
cd ~/labor/tag15

Introduction

So far you have changed Qdrant by hand with helm upgrade – twenty-one times. Which values currently apply is recorded in two files on the workbench and in Helm’s memory in the cluster. Who changed what and when, nobody knows. And if someone changes something with kubectl edit, nobody notices that either.

GitOps turns this around: the desired state is in a Git repository. A program in the cluster – here Argo CD – constantly compares what is in the repository with what is running, reports every deviation and, if desired, corrects it itself. Every change is a commit with author, time and reason; a rollback is a git revert.

That sounds like a change of tools – with a database it is more. Argo CD renders the Helm chart differently from Helm itself, only takes over what it knows, and knows nothing about Raft, shards or storage formats. Today you take over the running installation without losing a single point, and run into three traps along the way that are not in any guide. Afterwards, in a throwaway installation, you play through a real minor upgrade, a broken upgrade and a way back to the old version.

Today you will learn:

  • to provide a Git repository on vdb1 with a read-only key just for Argo CD,
  • to run Argo CD as a “core” installation without a web interface and operate it with the CLI,
  • to take over a running Helm installation in Argo CD – and check beforehand what would change,
  • why lookup in charts stays empty under Argo CD and what that means for Secrets,
  • to detect drift and have it reverted automatically with selfHeal,
  • to roll out a change under load and measure which collections throw errors in the process,
  • to play through a minor upgrade, a failed upgrade and a rollback via Git,
  • where a rollback ends: at the database’s storage format.

Background

The picture of the day: the building inspector with the approved plan

So far every branch did its own remodeling: one phone call, and the caretaker moved shelves around. From today there is an approved plan for the city library in the planning archive of the building authority. The building inspector constantly walks through the buildings and compares what is there with what is in the plan. If someone moves a shelf without authorization, the report says: “deviates from the plan”. If the building inspector has the order to do so, they put the shelf back immediately.

Anyone who wants to change something submits a plan amendment. Each one is filed in the archive with date and signature; if it is wrong, you pull out the previous version. There is only one thing the building inspector cannot do: sort books back that were re-sorted into a new classification system during the remodeling. The old plan then shows shelves that no longer exist in that form.

The terms

Term Meaning In the picture
GitOps desired state in Git, an agent in the cluster reconciles building only according to the approved plan
Argo CD GitOps tool for Kubernetes building inspector
Application object in Argo CD: source (repo, chart, path) + destination (cluster, namespace) a building with its plan
Sync apply the state from Git to the cluster remodel according to plan
OutOfSync / Synced cluster deviates / matches building inspector’s report
Drift change in the cluster that does not come from Git shelf moved without authorization
selfHeal revert drift automatically building inspector puts it back immediately
prune delete objects that are no longer in Git demolish what is no longer in the plan
Rolling update replace the pods of a StatefulSet one after another remodel branch by branch
Rollback go back to an earlier state (git revert) previous plan version
Storage format how Qdrant stores data on the volume; changes with versions classification system of the shelves

Remember: Argo CD compares Git with the cluster – not with what ran yesterday. What is not in the repository it does not know, and what it did not set itself it does not clean up either.

Drill 1: Back up first, then remodel

Today the management of your database changes. If something goes wrong, you want a state in the off-site store that is no more than a few minutes old. As on Day 12, you back up shards – a collection snapshot of a single peer only contains that peer’s own shards.

Step 1 – Where is doku? GET /collections/doku/cluster shows which shards the responding peer has itself and which are on other peers.

# on vdb1
curl -sS --cacert ../tag10/ca.crt -H "api-key: $(cat ../tag10/admin-key)" https://10.43.151.237:6333/collections/doku/cluster -o doku-cluster.json
# on vdb1
cat doku-cluster.json

Expected (your peer IDs will differ):

{"result":{"peer_id":121400021250061,"shard_count":1,"local_shards":[{"shard_id":0,"points_count":13220,"state":"Active"}],"remote_shards":[{"shard_id":0,"peer_id":857928665674298,"state":"Active"}],"shard_transfers":[]},"status":"ok","time":0.000844233}

What you see: doku has one shard with two copies (replication factor 2). One of them is on the responding peer 121400021250061. Which pod that is, GET /cluster tells you:

# on vdb1
curl -sS --cacert ../tag10/ca.crt -H "api-key: $(cat ../tag10/admin-key)" https://10.43.151.237:6333/cluster

Expected (excerpt – the list peers):

"peers":{"121400021250061":{"uri":"https://qdrant-0.qdrant-headless:6335/"},"1485700002748332":{"uri":"https://qdrant-2.qdrant-headless:6335/"},"857928665674298":{"uri":"https://qdrant-1.qdrant-headless:6335/"}}

Step 2 – back up the shard. The request goes directly to qdrant-0 (IP from kubectl get pods -o wide), not to the service, so that it is sure to hit a peer with the shard. Via snapshots_storage: s3, the backup lands directly in the off-site store.

# on vdb1
curl -sS --resolve qdrant-0.qdrant-headless:6333:10.42.1.61 --cacert ../tag10/ca.crt -H "api-key: $(cat ../tag10/admin-key)" -X POST https://qdrant-0.qdrant-headless:6333/collections/doku/shards/0/snapshots

Expected:

{"result":{"name":"doku-shard-0-2026-12-06-06-54-32-3.snapshot","creation_time":"2026-12-06T06:54:35","size":51217408},"status":"ok","time":2.81243328}
# on vdb1
~/werkbank/bin/aws --profile qdrant s3 ls --recursive s3://qdrant-sicherung/snapshots/doku/

Expected:

2026-12-06 02:28:48  109664256 snapshots/doku/doku-121400021250061-2026-12-06-02-28-41-0.snapshot
2026-12-06 02:37:20  109725696 snapshots/doku/doku-121400021250061-2026-12-06-02-37-15-2.snapshot
2026-12-06 06:54:35   51217408 snapshots/doku/shards/0/doku-shard-0-2026-12-06-06-54-32-3.snapshot

What you see: At 51 MB, the new shard backup is only half the size of the collection snapshots from Day 12 (110 MB). I did not investigate the reason – whether the optimizer has merged segments in the meantime or the shard snapshot packs differently; how to restore it is shown on Day 12, Drill 6. glove has not changed since Day 12; its three shard backups are still in the off-site store.

Remember: Before every remodeling, a fresh backup – shard by shard, at the peer that has it. The building inspector comes after the inventory has been done.

Save your progress? Sign up for free

Drill 2: A planning archive on vdb1

Argo CD needs a Git repository it can read. You do not need an account with a Git provider for that: a “bare” repository on vdb1 and SSH access are enough. The access gets its own user git, which has only git-shell instead of a shell, and its own key just for Argo CD.

Step 1 – create the user git.

# on vdb1
sudo adduser --system --group --shell /usr/bin/git-shell --home /srv/git git
Setting Value Meaning
--system system user without a password, UID below 1000
--group adds a group git with the same name
--shell /usr/bin/git-shell allows only Git commands, no login with a shell
--home /srv/git repositories and .ssh live there

Expected (excerpt):

info: Adding system user `git' (UID 110) ...
info: Adding new group `git' (GID 114) ...
info: Creating home directory `/srv/git' ...

You yourself (ubuntu) should be allowed to write, so you are added to the group git. The new group only takes effect after a new login – log out and back in once after the next command.

# on vdb1
sudo usermod -aG git ubuntu
  • -aG git – add the group git (-a) without removing the others.

Step 2 – the bare repository. A “bare” repository has no working copy, only the Git data – exactly what you push to.

# on vdb1
sudo -u git git init --bare --shared=group --initial-branch=main /srv/git/bibliothek.git
  • sudo -u git – run as the user git so that it owns the repository.
  • --shared=group – create files group-writable so that members of git may push.
  • --initial-branch=main – branch main instead of master.

Expected:

Initialized empty shared Git repository in /srv/git/bibliothek.git/

Step 3 – a key just for Argo CD. Without a passphrase, because a program uses it.

# on vdb1
ssh-keygen -t ed25519 -N "" -C argocd-lesen -f argocd-lesen
  • -t ed25519 – key type; -N "" – no passphrase; -C – comment; -f – file name.

Expected (excerpt):

Your identification has been saved in argocd-lesen
Your public key has been saved in argocd-lesen.pub

Step 4 – register the key with git. First the folder, for the owner only:

# on vdb1
sudo mkdir -m 700 /srv/git/.ssh
# on vdb1
sudo nano /srv/git/.ssh/authorized_keys

Enter one line: restrict, a space, then the content of argocd-lesen.pub (yours will be a different key).

/srv/git/.ssh/authorized_keys new file
restrict ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIA1kxFh9brdcFLnqpSkZmAnaQhQkHjfiAi9XCV08ccDS argocd-lesen

restrict forbids everything extra for this key: port forwarding, agent forwarding, terminal. git-shell ensures that only Git commands run.

# on vdb1
sudo chown -R git:git /srv/git/.ssh
# on vdb1
sudo chmod 600 /srv/git/.ssh/authorized_keys

Step 5 – check that the key does not get a shell.

# on vdb1
ssh -i argocd-lesen -o IdentitiesOnly=yes -o StrictHostKeyChecking=accept-new [email protected]
  • -o IdentitiesOnly=yes – offer only this key, not your others.
  • -o StrictHostKeyChecking=accept-new – accept vdb1’s host key the first time.

Expected (excerpt – the last two lines after the greeting):

fatal: Interactive git shell is not enabled.
hint: ~/git-shell-commands should exist and have read and execute access.

What you see: The login works, but git-shell refuses a shell. That is exactly what you want.

Step 6 – the working copy. You clone locally via the file path. Set the name and address for your commits beforehand:

# on vdb1
git config --global user.name "Labor vdb1"
# on vdb1
git config --global user.email [email protected]
# on vdb1
git clone /srv/git/bibliothek.git ~/bibliothek

Expected:

Cloning into '/home/ubuntu/bibliothek'...
fatal: detected dubious ownership in repository at '/srv/git/bibliothek.git'
To add an exception for this directory, call:

    git config --global --add safe.directory /srv/git/bibliothek.git
fatal: Could not read from remote repository.

What you see: Since Git 2.35.2, Git refuses to work in repositories owned by another user – protection against planted hooks. The repository belongs to git; you are ubuntu. Here the exception is right, because you trust the user git:

# on vdb1
git config --global --add safe.directory /srv/git/bibliothek.git
# on vdb1
git clone /srv/git/bibliothek.git ~/bibliothek

Expected:

Cloning into '/home/ubuntu/bibliothek'...
warning: You appear to have cloned an empty repository.
done.

Step 7 – check in the plan. The two Qdrant values files and the NetworkPolicies from Day 10 go into the repository. Not the Secrets – their values stay in the cluster; the plan only contains their names.

# on vdb1
mkdir ~/bibliothek/qdrant ~/bibliothek/regeln
# on vdb1
cp ~/labor/tag10/qdrant-werte.yaml ~/bibliothek/qdrant/werte.yaml
# on vdb1
cp ~/labor/tag12/sicherung-werte.yaml ~/bibliothek/qdrant/sicherung.yaml
# on vdb1
cp ~/labor/tag10/alles-zu.yaml ~/labor/tag10/freigaben.yaml ~/bibliothek/regeln/
# on vdb1
cd ~/bibliothek
# on vdb1
git add qdrant regeln
# on vdb1
git commit -m "Qdrant-Werte und NetworkPolicies aus Tag 10 und 12"

Expected:

[main (root-commit) daefc1e] Qdrant-Werte und NetworkPolicies aus Tag 10 und 12
 4 files changed, 166 insertions(+)
 create mode 100644 qdrant/sicherung.yaml
 create mode 100644 qdrant/werte.yaml
 create mode 100644 regeln/alles-zu.yaml
 create mode 100644 regeln/freigaben.yaml
# on vdb1
git push origin main

Expected:

To /srv/git/bibliothek.git
 * [new branch]      main -> main

Back to the working folder:

# on vdb1
cd ~/labor/tag15

Remember: A planning archive needs no Git provider: a bare repository, a user with git-shell, its own key with restrict. The plan contains the names of Secrets, never their values.

Save your progress? Sign up for free

Drill 3: Argo CD without a reception hall

Argo CD consists of several parts: the application controller (compares and reconciles), the repo server (fetches Git and renders Helm), Redis as a cache – and optionally an API server with a web interface, Dex for login, notifications and the ApplicationSet controller.

For this lab the core installation is enough: without API server and interface. You operate Argo CD with the CLI, which talks directly to the Kubernetes API. This saves memory, and there is no admin password lying around anywhere – who may operate Argo CD is governed solely by Kubernetes RBAC.

Step 1 – the chart repository.

# on vdb1
helm repo add argo https://argoproj.github.io/argo-helm

On 6 December 2026 the newest chart version was 10.20.4 with Argo CD v3.6.4 (helm search repo argo/argo-cd --versions).

Step 2 – vdb1’s host key. For SSH access, Argo CD checks the Git server’s host key like any SSH client. You fetch it with ssh-keyscan:

# on vdb1
ssh-keyscan -t ed25519 172.16.0.182

Expected (yours will be a different key):

# 172.16.0.182:22 SSH-2.0-OpenSSH_9.6p1 Ubuntu-3ubuntu13.20
172.16.0.182 ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIP+AecEzbHWrmactSFJmhuNoWeFo06MNx10uXYjD394V

Step 3 – the values file.

# on vdb1
nano argocd-werte.yaml
~/labor/tag15/argocd-werte.yaml new file
global:
  nodeSelector:
    kubernetes.io/hostname: vdb1

server:
  enabled: false

dex:
  enabled: false

notifications:
  enabled: false

applicationSet:
  enabled: false

configs:
  ssh:
    extraHosts: |
      172.16.0.182 ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIP+AecEzbHWrmactSFJmhuNoWeFo06MNx10uXYjD394V
Setting Value Meaning
global.nodeSelector kubernetes.io/hostname: vdb1 all parts on the workbench, the data nodes stay free
server.enabled false no API server, no interface – core installation
dex.enabled false no login via Dex, useless without an interface
notifications.enabled false no notifications
applicationSet.enabled false intended: no ApplicationSet controller (see Step 5)
configs.ssh.extraHosts line from ssh-keyscan vdb1’s host key added to the known hosts

Step 4 – install.

# on vdb1
helm install argocd argo/argo-cd --version 10.20.4 -n argocd --create-namespace -f argocd-werte.yaml --wait --timeout 10m
  • --create-namespace – creates argocd; --wait --timeout 10m – waits until everything is ready.

Expected (excerpt, after about a minute):

STATUS: deployed
REVISION: 1
DESCRIPTION: Install complete
TEST SUITE: None
NOTES:
Argo CD server is disabled (Argo CD Core installation): there is no UI or API server.
Use the CLI in core mode against the cluster instead:
# on vdb1
kubectl -n argocd get pods -o wide

Expected (excerpt – shortened on the right, all pods run on vdb1):

NAME                                               READY   STATUS      RESTARTS   AGE
argocd-application-controller-0                    1/1     Running     0          24s
argocd-applicationset-controller-bf44b795d-s8hqp   1/1     Running     0          24s
argocd-redis-6d88b97c55-zzrgv                      1/1     Running     0          24s
argocd-redis-secret-init-mb5bx                     0/1     Completed   0          60s
argocd-repo-server-65ccb6dfd7-6g2n6                1/1     Running     0          24s

Step 5 – a value that does not exist. The ApplicationSet controller is running even though you switched it off. The chart’s defaults show why:

# on vdb1
helm show values argo/argo-cd --version 10.20.4 | grep -n -A5 "^applicationSet:"

Expected:

3612:applicationSet:
3613-  # -- ApplicationSet controller name string
3614-  name: applicationset-controller
3615-
3616-  # -- The number of ApplicationSet controller pods to run
3617-  replicas: 1

What you see: For applicationSet there is no enabled, only replicas. Helm ignores unknown values without a warning. You change it:

# on vdb1
nano argocd-werte.yaml
~/labor/tag15/argocd-werte.yaml changes in green
global:
  nodeSelector:
    kubernetes.io/hostname: vdb1

server:
  enabled: false

dex:
  enabled: false

notifications:
  enabled: false

applicationSet:
  replicas: 0

configs:
  ssh:
    extraHosts: |
      172.16.0.182 ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIP+AecEzbHWrmactSFJmhuNoWeFo06MNx10uXYjD394V
# on vdb1
helm upgrade argocd argo/argo-cd --version 10.20.4 -n argocd -f argocd-werte.yaml --wait --timeout 10m
# on vdb1
kubectl -n argocd get deploy,sts

Expected:

NAME                                               READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/argocd-applicationset-controller   0/0     0            0           66s
deployment.apps/argocd-redis                       1/1     1            1           66s
deployment.apps/argocd-repo-server                 1/1     1            1           66s

NAME                                             READY   AGE
statefulset.apps/argocd-application-controller   1/1     66s

Step 6 – the CLI. Architecture-neutral from the release page, same version as the server:

# on vdb1
curl -sSL -o argocd https://github.com/argoproj/argo-cd/releases/download/v3.6.4/argocd-linux-$(dpkg --print-architecture)
# on vdb1
install -m 755 argocd ~/werkbank/bin/argocd
# on vdb1
~/werkbank/bin/argocd version --client --short

Expected:

argocd: v3.6.4+79451a9

In core mode, the CLI reads Argo CD’s settings (argocd-cm) from the namespace of the current kubectl context. So that you do not have to change your default namespace, you create a separate context argocd:

# on vdb1
kubectl config set-context argocd --cluster=default --user=default --namespace=argocd

Expected:

Context "argocd" created.
# on vdb1
~/werkbank/bin/argocd login --core --kube-context argocd

Expected:

Context 'kubernetes' updated
# on vdb1
~/werkbank/bin/argocd app list

Expected:

{"level":"fatal","msg":"configmap \"argocd-cm\" not found","time":"2026-12-06T06:59:29Z"}

What you see: login only remembers “core mode”, not the context. Without --kube-context, the CLI looks in the namespace default. Pass the context with every call:

# on vdb1
~/werkbank/bin/argocd app list --kube-context argocd

Expected:

NAME  CLUSTER  NAMESPACE  PROJECT  STATUS  HEALTH  SYNCPOLICY  CONDITIONS  REPO  PATH  TARGET

Step 7 – register the planning archive. Argo CD recognizes repository credentials by Secrets with the label argocd.argoproj.io/secret-type=repository. kubectl reads the private key directly from the file – it does not appear anywhere on the screen or in any YAML file.

# on vdb1
kubectl -n argocd create secret generic repo-bibliothek --from-literal=type=git --from-literal=url=ssh://[email protected]/srv/git/bibliothek.git --from-file=sshPrivateKey=argocd-lesen
Setting Value Meaning
type git type of repository (otherwise helm)
url ssh://[email protected]/srv/git/bibliothek.git user git, path to the bare repository
sshPrivateKey content of argocd-lesen key the repo server logs in with
# on vdb1
kubectl -n argocd label secret repo-bibliothek argocd.argoproj.io/secret-type=repository
# on vdb1
~/werkbank/bin/argocd repo list --kube-context argocd

Expected:

TYPE  NAME  REPO                                           INSECURE  OCI    LFS    CREDS  STATUS      MESSAGE  PROJECT
git         ssh://[email protected]/srv/git/bibliothek.git  false     false  false  false  Successful

What you see: Successful – the repo server logged in with the key and accepted the host key from extraHosts.

Remember: The core installation is a building inspector without a reception hall: no password, no interface, access only via Kubernetes RBAC. And Helm stays silent about values it does not know – check with helm show values whether your switch exists.

Save your progress? Sign up for free

Drill 4: The NetworkPolicies under supervision

You start with the most harmless part: the three NetworkPolicies. An Application tells Argo CD where the plan comes from (repository, branch, path) and where it belongs (cluster, namespace).

# on vdb1
nano regeln-app.yaml
~/labor/tag15/regeln-app.yaml new file
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: regeln
  namespace: argocd
spec:
  project: default
  source:
    repoURL: ssh://[email protected]/srv/git/bibliothek.git
    targetRevision: main
    path: regeln
  destination:
    server: https://kubernetes.default.svc
    namespace: qdrant
Setting Value Meaning
metadata.namespace argocd Applications live in Argo CD’s namespace
project default project for permissions and allowed destinations; default allows everything
source.targetRevision main branch, tag or commit that should apply
source.path regeln folder with YAML files; Argo CD applies all of them
destination.server https://kubernetes.default.svc the cluster itself

Without a syncPolicy, Argo CD does not reconcile on its own – it only reports.

# on vdb1
kubectl apply -f regeln-app.yaml

Afterwards, argocd app get regeln --kube-context argocd reports OutOfSync for all three policies, even though they are in the cluster exactly like that. What deviates is shown by app diff – the most important question before every sync:

# on vdb1
~/werkbank/bin/argocd app diff regeln --kube-context argocd

Expected (excerpt – the same for the other two policies):

===== networking.k8s.io/NetworkPolicy qdrant/alles-zu ======
4a5
>     argocd.argoproj.io/tracking-id: regeln:networking.k8s.io/NetworkPolicy:qdrant/alles-zu

What you see: Only one annotation is missing: the tracking ID, by which Argo CD recognizes that an object belongs to this Application. Otherwise the sync changes nothing.

# on vdb1
~/werkbank/bin/argocd app sync regeln --kube-context argocd

Expected (excerpt – the end):

Phase:              Succeeded
Duration:           1s
Message:            successfully synced (all tasks run)

GROUP              KIND           NAMESPACE  NAME                STATUS  HEALTH  HOOK  MESSAGE
networking.k8s.io  NetworkPolicy  qdrant     alles-zu            Synced                networkpolicy.networking.k8s.io/alles-zu configured
networking.k8s.io  NetworkPolicy  qdrant     rat-untereinander   Synced                networkpolicy.networking.k8s.io/rat-untereinander configured
networking.k8s.io  NetworkPolicy  qdrant     leser-und-werkbank  Synced                networkpolicy.networking.k8s.io/leser-und-werkbank configured

Remember: First app diff, then app sync. When taking over existing objects, the diff should show nothing except the tracking ID – anything else is a change you need to understand.

Save your progress? Sign up for free

Drill 5: Taking over Qdrant – compare first

For Qdrant, the Application needs two sources: the chart from Qdrant’s Helm repository and the values files from your planning archive. ref: bibliothek gives the second source a name through which the first accesses its files with $bibliothek/….

# on vdb1
nano qdrant-app.yaml
~/labor/tag15/qdrant-app.yaml new file
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: qdrant
  namespace: argocd
spec:
  project: default
  sources:
    - repoURL: https://qdrant.github.io/qdrant-helm
      chart: qdrant
      targetRevision: 1.20.3
      helm:
        releaseName: qdrant
        valueFiles:
          - $bibliothek/qdrant/werte.yaml
          - $bibliothek/qdrant/sicherung.yaml
    - repoURL: ssh://[email protected]/srv/git/bibliothek.git
      targetRevision: main
      ref: bibliothek
  destination:
    server: https://kubernetes.default.svc
    namespace: qdrant
Setting Value Meaning
chart / targetRevision qdrant / 1.20.3 chart and chart version – the same as before
helm.releaseName qdrant results in the same object names as the Helm installation
helm.valueFiles $bibliothek/qdrant/… values from the source with ref: bibliothek, in this order
ref bibliothek this source only provides files; it is not applied itself
# on vdb1
kubectl apply -f qdrant-app.yaml
# on vdb1
~/werkbank/bin/argocd app diff qdrant --kube-context argocd

Expected (excerpt – without the tracking IDs of ConfigMap, Secret, Services, ServiceAccount and PDB):

===== apps/StatefulSet qdrant/qdrant ======
4a5
>     argocd.argoproj.io/tracking-id: qdrant:apps/StatefulSet:qdrant/qdrant
262c263
<         checksum/secret: 17ab5d1abd1001dca3061eb4ee5f62ec6d3c9d49efc32c5ea3b72c41ced8e35e
---
>         checksum/secret: 6de63ed22aeb6aca1cbe0c84cc357d145a916ded4b3ab04b0ed9acf3e132fa44

What you see: Same chart, same values – and still a different checksum over the Secret qdrant-apikey. It is in the pod template, so a sync would restart all three pods. And the Secret itself? Argo CD hides Secret values in the diff. You render the chart the way Argo CD does – with helm template, without a connection to the cluster:

# on vdb1
cd ~/bibliothek
# on vdb1
helm template qdrant qdrant/qdrant --version 1.20.3 -n qdrant -f qdrant/werte.yaml -f qdrant/sicherung.yaml --show-only templates/secret.yaml
  • --show-only templates/secret.yaml – output only this one template.

Expected:

---
# Source: qdrant/templates/secret.yaml
apiVersion: v1
kind: Secret
metadata:
  name: qdrant-apikey
  labels:
    helm.sh/chart: qdrant-1.20.3
    app: qdrant
    app.kubernetes.io/name: qdrant
    app.kubernetes.io/instance: qdrant
    app.kubernetes.io/version: "v1.20.3"
    app.kubernetes.io/managed-by: Helm

data:

What you see: data: is empty. A sync would have removed the keys from qdrant-apikey and restarted Qdrant without authentication. The reason is in the chart’s templates/_helpers.tpl: for apiKey.valueFrom, it reads the key with the Helm function lookup from the Secret qdrant-schluessel. lookup queries the cluster – and always returns an empty result with helm template. Argo CD renders charts with helm template.

Remember: Charts with lookup behave differently under Argo CD than with helm install. Before the takeover, check with helm template what really comes out – especially for Secrets, which the diff hides.

Save your progress? Sign up for free

Drill 6: Keys without lookup – and a rollout under load

The way out: Qdrant also reads every setting from environment variables (QDRANT__SERVICE__API_KEY for service.api_key). Kubernetes fetches the values itself from a Secret – no lookup, no Secret from the chart, no checksum. As a side effect, the copy of the key in qdrant-apikey that bothered you on Day 10 disappears.

Step 1 – a Secret without a line break. Day 11 showed: openssl rand -hex -out writes a line break at the end. In a file like local.yaml, YAML cuts it off; in an environment variable it stays part of the key. You build a new Secret from single-line versions:

# on vdb1
cd ~/labor/tag15
# on vdb1
tr -d "\n" < ../tag10/admin-key > admin-key.einzeilig
# on vdb1
tr -d "\n" < ../tag10/lese-key > lese-key.einzeilig
# on vdb1
chmod 600 admin-key.einzeilig lese-key.einzeilig
# on vdb1
wc -c admin-key.einzeilig lese-key.einzeilig

Expected:

 64 admin-key.einzeilig
 64 lese-key.einzeilig
128 total
# on vdb1
kubectl -n qdrant create secret generic qdrant-zugang --from-file=admin=admin-key.einzeilig --from-file=lesen=lese-key.einzeilig

Step 2 – change the values in the plan. apiKey and readOnlyApiKey go out; environment variables come in instead. Caution: Helm replaces lists like env; it does not merge them. If env were in both values files, the second would win, and the S3 credentials from sicherung.yaml would displace the keys. That is why the whole list moves to werte.yaml.

# on vdb1
nano ~/bibliothek/qdrant/werte.yaml
~/bibliothek/qdrant/werte.yaml changes in green
image:
  tag: v1.20.3

replicaCount: 3

nodeSelector:
  vdb-rolle: daten

affinity:
  podAntiAffinity:
    requiredDuringSchedulingIgnoredDuringExecution:
      - labelSelector:
          matchLabels:
            app.kubernetes.io/name: qdrant
        topologyKey: kubernetes.io/hostname

resources:
  requests:
    cpu: 500m
    memory: 1Gi
  limits:
    memory: 2Gi

containerSecurityContext:
  runAsNonRoot: true
  runAsUser: 1000
  runAsGroup: 2000
  allowPrivilegeEscalation: false
  privileged: false
  readOnlyRootFilesystem: true
  capabilities:
    drop:
      - ALL
  seccompProfile:
    type: RuntimeDefault

podSecurityContext:
  fsGroup: 3000
  fsGroupChangePolicy: OnRootMismatch
  seccompProfile:
    type: RuntimeDefault

updateVolumeFsOwnership: false

persistence:
  size: 4Gi
  storageClassName: longhorn

startupProbe:
  enabled: true

livenessProbe:
  enabled: true

config:
  telemetry_disabled: true
  cluster:
    p2p:
      enable_tls: true
  service:
    jwt_rbac: true
    enable_tls: true
  tls:
    cert: /qdrant/tls/tls.crt
    key: /qdrant/tls/tls.key
    ca_cert: /qdrant/tls/ca.crt
    cert_ttl: 3600

podDisruptionBudget:
  enabled: true
  maxUnavailable: 1

env:
  - name: QDRANT__SERVICE__API_KEY
    valueFrom:
      secretKeyRef:
        name: qdrant-zugang
        key: admin
  - name: QDRANT__SERVICE__READ_ONLY_API_KEY
    valueFrom:
      secretKeyRef:
        name: qdrant-zugang
        key: lesen
  - name: AWS_ACCESS_KEY_ID
    valueFrom:
      secretKeyRef:
        name: qdrant-s3
        key: zugang
  - name: AWS_SECRET_ACCESS_KEY
    valueFrom:
      secretKeyRef:
        name: qdrant-s3
        key: geheim

additionalVolumes:
  - name: tls
    secret:
      secretName: qdrant-tls

additionalVolumeMounts:
  - name: tls
    mountPath: /qdrant/tls
    readOnly: true
# on vdb1
nano ~/bibliothek/qdrant/sicherung.yaml
~/bibliothek/qdrant/sicherung.yaml changes in green
# Zusatz zu werte.yaml: Snapshots ins Außenlager (S3); die Zugangsdaten stehen in werte.yaml unter env
config:
  storage:
    snapshots_config:
      snapshots_storage: s3
      s3_config:
        bucket: qdrant-sicherung
        region: us-east-1
        endpoint_url: http://172.16.0.182:8333

Before the commit, the same test as in Drill 5:

# on vdb1
cd ~/bibliothek
# on vdb1
helm template qdrant qdrant/qdrant --version 1.20.3 -n qdrant -f qdrant/werte.yaml -f qdrant/sicherung.yaml --show-only templates/secret.yaml

Expected:

Error: could not find template templates/secret.yaml in chart

What you see: The template no longer generates anything – without apiKey, the chart does not create a Secret.

# on vdb1
git commit -am "Qdrant: Schlüssel als Umgebungsvariablen aus qdrant-zugang statt lookup"
# on vdb1
git push origin main

Step 3 – what the diff does not show. Argo CD polls the repository on its own every three minutes; --refresh fetches the new state immediately.

# on vdb1
~/werkbank/bin/argocd app get qdrant --refresh --kube-context argocd
# on vdb1
~/werkbank/bin/argocd app diff qdrant --kube-context argocd

Expected (excerpt – the StatefulSet):

===== apps/StatefulSet qdrant/qdrant ======
4a5
>     argocd.argoproj.io/tracking-id: qdrant:apps/StatefulSet:qdrant/qdrant
284a286,295
>         - name: QDRANT__SERVICE__API_KEY
>           valueFrom:
>             secretKeyRef:
>               key: admin
>               name: qdrant-zugang
>         - name: QDRANT__SERVICE__READ_ONLY_API_KEY
>           valueFrom:
>             secretKeyRef:
>               key: lesen
>               name: qdrant-zugang

What you see: The new variables are there. What is missing: the removal of the annotation checksum/secret and the volume qdrant-secret (the old local.yaml). By default, Argo CD applies like kubectl apply and only removes fields that it set itself last time. These fields were set by Helm:

# on vdb1
kubectl -n qdrant get statefulset qdrant --show-managed-fields -o jsonpath="{range .metadata.managedFields[*]}{.manager} {.operation}{\"\n\"}{end}"

Expected:

helm Apply
kubectl-rollout Update
k3s Update
# on vdb1
kubectl -n qdrant get statefulset qdrant -o jsonpath="{.spec.template.spec.volumes[*].name}"

Expected:

qdrant-config qdrant-snapshots qdrant-init qdrant-secret tls

What you see: A normal sync would leave qdrant-secret in place. At the latest when you delete qdrant-apikey, no pod would start any more. For the StatefulSet you therefore use --replace once: Argo CD then replaces the object completely with the rendered one (like kubectl replace). Only for the StatefulSet: I do not replace the services, because the TLS certificate is issued for the cluster IP – I did not try whether replace would keep it.

Step 4 – roll out under load. The sync restarts the three pods one after another. At the same time you measure with two probers: one on doku (replication factor 2) and one on glove (replication factor 1). The prober is the one from Day 10, extended by the choice of vector file and without the version check warning (check_compatibility=False):

# on vdb1
nano ~/labor/tag15/proben.py
~/labor/tag15/proben.py new file
"""Fragt eine Collection viermal pro Sekunde ab und meldet jeden Zustandswechsel.

Mit https:// nimmt es den Lese-Schlüssel und die CA aus Tag 10, mit http:// fragt es ohne beides.

Aufruf: python proben.py <url> <collection> <vektoren.npy> <sekunden>
"""
import ssl
import sys
import time

import numpy as np
from qdrant_client import QdrantClient

QDRANT, COLLECTION, VEKTOREN, SEKUNDEN = sys.argv[1], sys.argv[2], sys.argv[3], int(sys.argv[4])

vektor = np.load(VEKTOREN)[0].tolist()
if QDRANT.startswith("https://"):
    schluessel = open("../tag10/lese-key").read().strip()
    ca = ssl.create_default_context(cafile="../tag10/ca.crt")
    client = QdrantClient(url=QDRANT, api_key=schluessel, verify=ca, timeout=2, check_compatibility=False)
else:
    client = QdrantClient(url=QDRANT, timeout=2, check_compatibility=False)

ok, fehler, zustand, seit = 0, 0, None, time.time()
ende = time.time() + SEKUNDEN
while time.time() < ende:
    try:
        client.query_points(COLLECTION, query=vektor, limit=5)
        ok += 1
        neu = "antwortet"
    except Exception as e:
        fehler += 1
        neu = "FEHLER: " + str(e).splitlines()[0][:90]
    if neu != zustand:
        dauer = f" (vorher {time.time() - seit:.1f} s)" if zustand else ""
        print(f"{time.strftime('%T')} {COLLECTION}: {neu}{dauer}", flush=True)
        zustand, seit = neu, time.time()
    time.sleep(0.25)
print(f"{time.strftime('%T')} {COLLECTION}: Ende – {ok} Antworten, {fehler} Fehler", flush=True)

Start the two probers in two more terminals on vdb1, each in the folder ~/labor/tag15:

# on vdb1, Terminal 2
~/werkbank/bin/python proben.py https://10.43.151.237:6333 doku ../tag01/vektoren.npy 420
# on vdb1, Terminal 3
~/werkbank/bin/python proben.py https://10.43.151.237:6333 glove ../tag08/glove-fragen.npy 420

In the first terminal, you replace the StatefulSet and wait for the rollout:

# on vdb1
~/werkbank/bin/argocd app sync qdrant --resource apps:StatefulSet:qdrant --replace --kube-context argocd
  • --resource apps:StatefulSet:qdrant – synchronize only this object (group:kind:name).
  • --replace – replace instead of apply.

Expected (excerpt):

apps    StatefulSet          qdrant     qdrant           Synced     Progressing        statefulset.apps/qdrant replaced
# on vdb1
kubectl -n qdrant rollout status statefulset qdrant --timeout 400s

Expected (excerpt, after 2:52 min – 07:04:59 to 07:07:51):

Waiting for partitioned roll out to finish: 1 out of 3 new pods have been updated...
Waiting for partitioned roll out to finish: 2 out of 3 new pods have been updated...
partitioned roll out complete: 3 new pods have been updated...

The probers after the end:

Expected (terminal 2):

07:04:57 doku: antwortet
07:11:57 doku: Ende – 1557 Antworten, 0 Fehler

Expected (terminal 3, excerpt – the first of three identical blocks and the end):

07:04:57 glove: antwortet
07:05:07 glove: FEHLER: Unexpected Response: 500 (Internal Server Error) (vorher 10.0 s)
07:05:09 glove: FEHLER: The read operation timed out (vorher 2.3 s)
07:05:12 glove: FEHLER: Unexpected Response: 500 (Internal Server Error) (vorher 3.5 s)
07:05:48 glove: antwortet (vorher 35.7 s)
07:11:57 glove: Ende – 1034 Antworten, 186 Fehler

What you see:

Collection Replication factor Result during the rollout
doku 2 1557 responses, 0 errors – one copy was always reachable
glove 1 186 errors in three blocks of about 41 s (35.7 / 44.8 / 41.5 s) – one shard was gone each time

That is exactly how the Qdrant documentation (“Upgrades”) describes it: without downtime only if all collections have at least two copies and the nodes restart one after another.

Step 5 – check and take over the rest.

# on vdb1
kubectl -n qdrant get statefulset qdrant -o jsonpath="{.spec.template.spec.volumes[*].name}"

Expected:

qdrant-config qdrant-snapshots qdrant-init tls
# on vdb1
curl -sS -o /dev/null -w "%{http_code}\n" --cacert ../tag10/ca.crt -H "api-key: $(cat ../tag10/lese-key)" https://10.43.151.237:6333/collections

Expected: 200. The same request without a key results in 401 – authentication still applies.

# on vdb1
~/werkbank/bin/argocd app sync qdrant --kube-context argocd

Expected (excerpt – the status and the StatefulSet’s line):

Sync Status:        Synced to 1.20.3
Health Status:      Healthy
apps    StatefulSet          qdrant     qdrant           Synced  Healthy        statefulset.apps/qdrant configured. Warning: resource statefulsets/qdrant is missing the kubectl.kubernetes.io/last-applied-configuration annotation which is required by  apply.

What you see: The same warning for every object created by Helm: the annotation with which kubectl apply remembers its last state is missing – it is now being set. From now on Argo CD can remove fields again too. The pods keep running, no further restart.

Step 6 – delete Helm’s memory. Helm still holds ten release Secrets (revision 12 to 21), each with all values – including the old key. helm uninstall would delete the objects; you delete only the release Secrets and the no longer used qdrant-apikey:

# on vdb1
kubectl -n qdrant delete secret -l owner=helm,name=qdrant

Expected (excerpt – first and last line):

secret "sh.helm.release.v1.qdrant.v12" deleted from qdrant namespace
secret "sh.helm.release.v1.qdrant.v21" deleted from qdrant namespace
# on vdb1
kubectl -n qdrant delete secret qdrant-apikey
# on vdb1
helm -n qdrant list

Expected:

NAME    NAMESPACE   REVISION    UPDATED STATUS  CHART   APP VERSION

What you see: For Helm, Qdrant no longer exists. From now on: changes only via ~/bibliothek and Argo CD, never again helm upgrade. You no longer need the single-line key files; the Secret is the source:

# on vdb1
cd ~/labor/tag15
# on vdb1
rm admin-key.einzeilig lese-key.einzeilig

Remember: Argo CD only cleans up what it set itself. When taking over Helm objects, the diff does not show fields that would have to disappear – check volumes and annotations yourself and, if in doubt, replace once with --replace. A rollout is only downtime-free for collections with two copies.

Save your progress? Sign up for free

Drill 7: Shelves moved without authorization

While troubleshooting, someone deletes the NetworkPolicy that allows the workbench and readers in. What does Argo CD notice?

Step 1 – create drift.

# on vdb1
kubectl -n qdrant delete networkpolicy leser-und-werkbank
# on vdb1
curl -sS -m 5 -o /dev/null -w "%{http_code}\n" --cacert ../tag10/ca.crt -H "api-key: $(cat ../tag10/lese-key)" https://10.43.151.237:6333/collections

Expected:

curl: (7) Failed to connect to 10.43.151.237 port 6333 after 1 ms: Couldn't connect to server
000
# on vdb1
~/werkbank/bin/argocd app get regeln --kube-context argocd

Expected (excerpt):

Sync Status:        OutOfSync from main (d2c7309)
Health Status:      Healthy
networking.k8s.io  NetworkPolicy  qdrant     leser-und-werkbank  OutOfSync  Missing        networkpolicy.networking.k8s.io/leser-und-werkbank configured

What you see: alles-zu still applies, the allow rule is missing – the workbench is locked out. Argo CD reports Missing, but does nothing: the Application has no sync policy.

Step 2 – switch on self-healing.

# on vdb1
nano regeln-app.yaml
~/labor/tag15/regeln-app.yaml changes in green
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: regeln
  namespace: argocd
spec:
  project: default
  source:
    repoURL: ssh://[email protected]/srv/git/bibliothek.git
    targetRevision: main
    path: regeln
  destination:
    server: https://kubernetes.default.svc
    namespace: qdrant
  syncPolicy:
    automated:
      prune: false
      selfHeal: true
Setting Value Meaning
automated apply new commits automatically
prune false do not delete objects that disappear from Git
selfHeal true revert deviations in the cluster immediately
# on vdb1
kubectl apply -f regeln-app.yaml
# on vdb1
kubectl -n qdrant get networkpolicy

Expected:

NAME                 POD-SELECTOR                    AGE
alles-zu             <none>                          6h31m
leser-und-werkbank   app.kubernetes.io/name=qdrant   9s
rat-untereinander    app.kubernetes.io/name=qdrant   6h30m

Step 3 – delete it again. Deleted at 07:13:38.9:

# on vdb1
kubectl -n qdrant delete networkpolicy leser-und-werkbank
# on vdb1
kubectl -n qdrant get networkpolicy leser-und-werkbank -o jsonpath="{.metadata.creationTimestamp}{\"\n\"}"

Expected:

2026-12-06T07:13:39Z

What you see: After less than a second the policy was back. Argo CD watches the objects via the Kubernetes API and does not have to wait for the next poll.

Step 4 – drift in Qdrant. For the database you deliberately leave selfHeal off: every sync can trigger a rollout, which you start at a time of your choosing. Drift is reported anyway:

# on vdb1
kubectl -n qdrant patch poddisruptionbudget qdrant --type merge -p '{"spec":{"maxUnavailable":3}}'
# on vdb1
~/werkbank/bin/argocd app diff qdrant --kube-context argocd

Expected:

===== policy/PodDisruptionBudget qdrant/qdrant ======
84c84
<   maxUnavailable: 3
---
>   maxUnavailable: 1
# on vdb1
~/werkbank/bin/argocd app sync qdrant --resource policy:PodDisruptionBudget:qdrant --kube-context argocd
# on vdb1
kubectl -n qdrant get poddisruptionbudget qdrant

Expected:

NAME     MIN AVAILABLE   MAX UNAVAILABLE   ALLOWED DISRUPTIONS   AGE
qdrant   N/A             1                 1                     19h

Remember: Without a sync policy, the building inspector only reports; with selfHeal, it puts things back – in under a second. For rules and policies that is right; for the database itself, you decide when to remodel.

Save your progress? Sign up for free

Drill 8: A minor upgrade in a test build

Qdrant 1.20.3 is the newest version today (December 2026) – helm search repo qdrant/qdrant --versions shows nothing newer. That is why you practice a real upgrade in a test build: a throwaway installation with three pods that starts with 1.19.2. This way you do not risk any real data, even with the broken upgrade and the way back.

Step 1 – the plan for the test build. Small requests so that it fits on the data nodes next to Qdrant; no keys and no TLS – it is only reachable from within the cluster and lives for half an hour.

# on vdb1
mkdir ~/bibliothek/probebau
# on vdb1
nano ~/bibliothek/probebau/werte.yaml
~/bibliothek/probebau/werte.yaml new file
image:
  tag: v1.19.2

replicaCount: 3

resources:
  requests:
    cpu: 100m
    memory: 256Mi
  limits:
    memory: 512Mi

persistence:
  size: 1Gi
  storageClassName: longhorn

config:
  telemetry_disabled: true

The version is in Git as image.tag, not as a chart version in the Application – that way the upgrade is a commit in the planning archive. The chart stays at 1.20.3.

# on vdb1
cd ~/bibliothek
# on vdb1
git add probebau
# on vdb1
git commit -m "Probebau: Qdrant 1.19.2 mit drei Pods"
# on vdb1
git push origin main

Step 2 – the Application. This time with full automation: prune, selfHeal and CreateNamespace=true, so that Argo CD creates the namespace itself.

# on vdb1
cd ~/labor/tag15
# on vdb1
nano probebau-app.yaml
~/labor/tag15/probebau-app.yaml new file
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: probebau
  namespace: argocd
spec:
  project: default
  sources:
    - repoURL: https://qdrant.github.io/qdrant-helm
      chart: qdrant
      targetRevision: 1.20.3
      helm:
        releaseName: probebau
        valueFiles:
          - $bibliothek/probebau/werte.yaml
    - repoURL: ssh://[email protected]/srv/git/bibliothek.git
      targetRevision: main
      ref: bibliothek
  destination:
    server: https://kubernetes.default.svc
    namespace: probebau
  syncPolicy:
    automated:
      prune: true
      selfHeal: true
    syncOptions:
      - CreateNamespace=true
# on vdb1
kubectl apply -f probebau-app.yaml
# on vdb1
kubectl -n probebau rollout status statefulset probebau-qdrant --timeout 600s
# on vdb1
kubectl -n probebau get pods -o wide

Expected (shortened on the right):

NAME                READY   STATUS    RESTARTS      AGE   IP           NODE
probebau-qdrant-0   1/1     Running   0             69s   10.42.3.10   vdb4
probebau-qdrant-1   1/1     Running   2 (27s ago)   69s   10.42.1.71   vdb2
probebau-qdrant-2   1/1     Running   2 (22s ago)   69s   10.42.2.20   vdb3

What you see: The chart starts all three pods at the same time (podManagementPolicy: Parallel). Two restarted twice each – presumably because they tried to join the cluster before the first peer was ready; after that all three ran without further restarts. The service IP (here 10.43.41.73) returns the version:

# on vdb1
curl -sS http://10.43.41.73:6333/

Expected:

{"title":"qdrant - vector search engine","version":"1.19.2","commit":"016542aa5deb6c66380bb137badf73d54f742bde"}

Step 3 – test data. A short script creates probe with three shards and two copies and loads 3000 vectors from Day 1:

# on vdb1
nano probe-laden.py
~/labor/tag15/probe-laden.py new file
"""Legt im Probebau die Collection probe an (3 Shards, 2 Kopien) und lädt 3000 Vektoren aus Tag 1."""
import sys

import numpy as np
from qdrant_client import QdrantClient, models

client = QdrantClient(url=sys.argv[1], timeout=30, check_compatibility=False)
vektoren = np.load("../tag01/vektoren.npy")[:3000]

client.create_collection(
    "probe",
    vectors_config=models.VectorParams(size=768, distance=models.Distance.COSINE),
    shard_number=3,
    replication_factor=2,
)
for start in range(0, len(vektoren), 500):
    stueck = vektoren[start:start + 500]
    client.upsert(
        "probe",
        points=models.Batch(ids=list(range(start, start + len(stueck))), vectors=stueck.tolist()),
        wait=True,
    )
print("Punkte:", client.count("probe", exact=True).count)
# on vdb1
~/werkbank/bin/python probe-laden.py http://10.43.41.73:6333

Expected:

Punkte: 3000

Step 4 – the upgrade is a commit. Start the prober on probe in terminal 2:

# on vdb1, Terminal 2
~/werkbank/bin/python proben.py http://10.43.41.73:6333 probe ../tag01/vektoren.npy 300

Then you change one line in the plan:

# on vdb1
nano ~/bibliothek/probebau/werte.yaml
~/bibliothek/probebau/werte.yaml changes in green
image:
  tag: v1.20.3

replicaCount: 3

resources:
  requests:
    cpu: 100m
    memory: 256Mi
  limits:
    memory: 512Mi

persistence:
  size: 1Gi
  storageClassName: longhorn

config:
  telemetry_disabled: true
# on vdb1
cd ~/bibliothek
# on vdb1
git commit -am "Probebau: Qdrant 1.20.3"
# on vdb1
git push origin main
# on vdb1
~/werkbank/bin/argocd app get probebau --refresh --kube-context argocd

Because of automated, Argo CD applies the commit itself. Wait until all pods have been replaced – why rollout status alone is not enough here is shown in the diagnosis task:

# on vdb1
kubectl -n probebau rollout status statefulset probebau-qdrant --timeout 600s

Expected (excerpt, finished at 07:17:58 – the sync began at 07:16:31):

Waiting for partitioned roll out to finish: 1 out of 3 new pods have been updated...
Waiting for partitioned roll out to finish: 2 out of 3 new pods have been updated...
partitioned roll out complete: 3 new pods have been updated...
# on vdb1
curl -sS http://10.43.41.73:6333/

Expected:

{"title":"qdrant - vector search engine","version":"1.20.3","commit":"0e7061a7ad2e0660ca7507ad154eb2e95e6f51c6"}
# on vdb1
kubectl -n probebau logs probebau-qdrant-0

Expected (excerpt – look for the line with Replaced metadata):

2026-12-06T07:17:45.905109Z  INFO storage::content_manager::consensus::persistent: Replaced metadata of peer 8916984642809150 from PeerMetadata { version: Version { major: 1, minor: 19, patch: 2 } } to PeerMetadata { version: Version { major: 1, minor: 20, patch: 3 } }

Expected (terminal 2, after five minutes):

07:16:23 probe: antwortet
07:21:24 probe: Ende – 1118 Antworten, 0 Fehler

What you see: About one and a half minutes for three pods, not a single error – probe has two copies of every shard. Each peer records its version in the Raft state. The documentation requires that you do not skip minor versions: from 1.15 to 1.17 only via 1.16.3 (“Upgrades”, qdrant.tech/documentation).

Remember: An upgrade is a plan amendment: one commit, one sync, one rollout pod by pod. Without downtime only with two copies – and never skip minor versions.

Save your progress? Sign up for free

Drill 9: An upgrade that never arrives

A typo in the version: v1.20.99 does not exist. Start the prober in terminal 2 (this time 360 s), then:

# on vdb1, Terminal 2
~/werkbank/bin/python proben.py http://10.43.41.73:6333 probe ../tag01/vektoren.npy 360
# on vdb1
nano ~/bibliothek/probebau/werte.yaml

Line 2 now says tag: v1.20.99 – the rest stays as in Drill 8.

~/bibliothek/probebau/werte.yaml changes in green
image:
  tag: v1.20.99

replicaCount: 3

resources:
  requests:
    cpu: 100m
    memory: 256Mi
  limits:
    memory: 512Mi

persistence:
  size: 1Gi
  storageClassName: longhorn

config:
  telemetry_disabled: true
# on vdb1
git commit -am "Probebau: Qdrant 1.20.99"
# on vdb1
git push origin main
# on vdb1
~/werkbank/bin/argocd app get probebau --refresh --kube-context argocd

This time you wait with Argo CD itself: app wait only returns when the new state has been applied and is healthy.

# on vdb1
~/werkbank/bin/argocd app wait probebau --sync --health --timeout 180 --kube-context argocd
  • --sync – wait until the state from Git has been applied; --health – until all objects are healthy.

Expected (excerpt – the end after three minutes):

{"level":"fatal","msg":"timed out (180s) waiting for app \"probebau\" match desired state","time":"2026-12-06T07:25:01Z"}
# on vdb1
kubectl -n probebau get pods

Expected (excerpt – the first columns):

NAME                READY   STATUS                  RESTARTS   AGE
probebau-qdrant-0   1/1     Running                 0          7m36s
probebau-qdrant-1   1/1     Running                 0          8m1s
probebau-qdrant-2   0/1     Init:ImagePullBackOff   0          2m55s
# on vdb1
kubectl -n probebau get events --field-selector involvedObject.name=probebau-qdrant-2 --sort-by=.lastTimestamp

Expected (excerpt – the line with the reason, shortened on the right):

72s         Warning   Failed                   pod/probebau-qdrant-2   Failed to pull image "docker.io/qdrant/qdrant:v1.20.99": rpc error: code = NotFound desc = failed to pull and unpack image
# on vdb1
~/werkbank/bin/argocd app get probebau --kube-context argocd

Expected (excerpt):

Sync Status:        Synced to 1.20.3
Health Status:      Progressing

What you see:

Observation Meaning
only qdrant-2 hangs, 0 and 1 run with 1.20.3 the rollout pauses as long as a pod is not ready (maxUnavailable: 1)
Init:ImagePullBackOff even the chart’s init container uses the same image
Synced, but Progressing Argo CD has applied the plan; it does not report “broken”, only “not finished yet”

Rollback is a git revert.

# on vdb1
git revert --no-edit HEAD

Expected (excerpt):

[main 06509ac] Revert "Probebau: Qdrant 1.20.99"
 1 file changed, 1 insertion(+), 1 deletion(-)
# on vdb1
git push origin main
# on vdb1
~/werkbank/bin/argocd app get probebau --refresh --kube-context argocd
# on vdb1
~/werkbank/bin/argocd app wait probebau --sync --health --timeout 240 --kube-context argocd

Expected (excerpt – the last line, after 22 s):

apps   StatefulSet     probebau   probebau-qdrant           Synced  Healthy        statefulset.apps/probebau-qdrant configured

Expected (terminal 2):

07:21:52 probe: antwortet
07:27:52 probe: Ende – 1340 Antworten, 0 Fehler

What you see: The controller replaced the hanging pod with one running 1.20.3 by itself. For podManagementPolicy: OrderedReady, the Kubernetes documentation warns that you have to delete such a pod by hand after reverting (“Forced rollback”); this chart uses Parallel, where it was not necessary. Reads worked without errors the whole time – two pods with all shards were enough.

Remember: A broken image pauses the rollout at the first pod; Argo CD reports Progressing, not Degraded. Wait with argocd app wait --sync --health --timeout and revert the commit with git revert.

Save your progress? Sign up for free

Drill 10: How far does the way back go?

The test build runs with 1.20.3 and data written by 1.20.3. May you go back to 1.19.2? The upgrade documentation only describes the way up. For snapshots it is clear: they can only be restored in the same or the next minor version – a snapshot from 1.18.1 in 1.18.x (x ≥ 1) or 1.19.x (“Snapshots”, qdrant.tech/documentation). A snapshot from 1.20 in 1.19 is not included. You try both in the test build – you never do this with real data.

Step 1 – revert the upgrade. Start the prober (300 s), then revert the upgrade commit from Drill 8:

# on vdb1, Terminal 2
~/werkbank/bin/python proben.py http://10.43.41.73:6333 probe ../tag01/vektoren.npy 300
# on vdb1
git log --oneline

Expected:

06509ac Revert "Probebau: Qdrant 1.20.99"
b575788 Probebau: Qdrant 1.20.99
db3c937 Probebau: Qdrant 1.20.3
f7d1a7e Probebau: Qdrant 1.19.2 mit drei Pods
d2c7309 Qdrant: Schlüssel als Umgebungsvariablen aus qdrant-zugang statt lookup
daefc1e Qdrant-Werte und NetworkPolicies aus Tag 10 und 12
# on vdb1
git revert --no-edit db3c937
# on vdb1
git push origin main
# on vdb1
~/werkbank/bin/argocd app get probebau --refresh --kube-context argocd
# on vdb1
~/werkbank/bin/argocd app wait probebau --sync --health --timeout 240 --kube-context argocd
# on vdb1
curl -sS http://10.43.41.73:6333/collections/probe -o probe-info.json
# on vdb1
jq -c "{status: .result.status, punkte: .result.points_count}" probe-info.json

Expected:

{"status":"green","punkte":3000}

Expected (terminal 2):

07:28:11 probe: antwortet
07:33:11 probe: Ende – 1114 Antworten, 0 Fehler

Step 2 – a snapshot from 1.20.3 in 1.19.2. The shard backup of doku from Drill 1 comes from the real Qdrant 1.20.3. You restore it into a new, empty collection in the test build:

# on vdb1
~/werkbank/bin/aws --profile qdrant s3 presign s3://qdrant-sicherung/snapshots/doku/shards/0/doku-shard-0-2026-12-06-06-54-32-3.snapshot --expires-in 900 > doku-shard-url.txt
# on vdb1
curl -sS -X PUT http://10.43.41.73:6333/collections/doku-alt -H "Content-Type: application/json" -d "{\"vectors\":{\"size\":768,\"distance\":\"Cosine\"},\"shard_number\":1,\"replication_factor\":1}"
# on vdb1
curl -sS -X PUT http://10.43.41.73:6333/collections/doku-alt/shards/0/snapshots/recover -H "Content-Type: application/json" -d "{\"location\":\"$(cat doku-shard-url.txt)\"}"

Expected:

{"result":true,"status":"ok","time":2.083631777}
# on vdb1
curl -sS -X POST http://10.43.41.73:6333/collections/doku-alt/points/count -H "Content-Type: application/json" -d "{\"exact\":true}"

Expected:

{"result":{"count":13220},"status":"ok","time":0.179741832}

Step 3 – even further back: 1.17.1. Three minor versions below the data from 1.20.3:

# on vdb1
nano ~/bibliothek/probebau/werte.yaml
~/bibliothek/probebau/werte.yaml changes in green
image:
  tag: v1.17.1

replicaCount: 3

resources:
  requests:
    cpu: 100m
    memory: 256Mi
  limits:
    memory: 512Mi

persistence:
  size: 1Gi
  storageClassName: longhorn

config:
  telemetry_disabled: true
# on vdb1
git commit -am "Probebau: zurück auf Qdrant 1.17.1"
# on vdb1
git push origin main
# on vdb1
~/werkbank/bin/argocd app get probebau --refresh --kube-context argocd
# on vdb1
~/werkbank/bin/argocd app wait probebau --sync --health --timeout 150 --kube-context argocd
# on vdb1
curl -sS -X POST http://10.43.41.73:6333/collections/doku-alt/points/count -H "Content-Type: application/json" -d "{\"exact\":true}"

Expected:

{"result":{"count":13220},"status":"ok","time":0.008801793}

What you see:

Attempt Documentation Result in the lab
Rolling downgrade 1.20.3 → 1.19.2 not described ran, 3000 points, 0 errors
Snapshot from 1.20.3 in 1.19.2 not supported worked, 13,220 points
Downgrade to 1.17.1 not described ran, both collections complete

I looked for the limit and did not find it with this small data. That does not mean it is safe: what is not supported is untested. A version that changes the storage format can block exactly this way back – and you only notice when you need it. The hard limit lies elsewhere anyway: git revert resets the plan, not the data. Whatever was deleted or overwritten between upgrade and rollback stays that way. The way back is only secured by a snapshot taken before the upgrade – restored into the version it comes from.

Step 4 – take down the test build. First the Application, then the namespace including volumes, then the folder in the plan:

# on vdb1
kubectl -n argocd delete application probebau
# on vdb1
kubectl -n probebau get statefulset

Expected:

NAME              READY   AGE
probebau-qdrant   3/3     22m
# on vdb1
kubectl delete namespace probebau
# on vdb1
git rm -r probebau
# on vdb1
git commit -m "Probebau abgebaut"
# on vdb1
git push origin main

What you see: After the Application was deleted, the StatefulSet kept running: without the finalizer resources-finalizer.argocd.argoproj.io, Argo CD does not remove any objects on deletion. Only deleting the namespace cleans up pods and volumes. You take the folder out of the plan only afterwards; as long as the Application still reads it, it belongs there.

Remember: A rollback of the plan is not a rollback of the data. Take a snapshot before every minor upgrade – and do not rely on ways back that the documentation does not promise, even if they worked in the lab.

Save your progress? Sign up for free

Diagnosis task: “rollout complete” after six seconds

A pipeline pushes the upgrade to 1.20.3, calls kubectl rollout status right afterwards and reports success. In the log of Drill 8:

07:16:26
Sync Status:        OutOfSync from 1.20.3
partitioned roll out complete: 3 new pods have been updated...
07:16:32

Shortly afterwards the pods are still running 1.19.2. What happened, and how does the pipeline wait correctly? Think it through yourself first.

Solution path.

Step 1 – When did Argo CD apply?

# on vdb1
kubectl -n argocd get application probebau -o jsonpath='{.status.operationState.startedAt} {.status.operationState.syncResult.revisions}{"\n"}'

Expected:

2026-12-06T07:16:31Z ["1.20.3","db3c93750d2691f1b6e5b10bc2b4eb4645b4797e"]

Step 2 – When did the new pods start?

# on vdb1
kubectl -n probebau get pods -o custom-columns=NAME:.metadata.name,IMAGE:.spec.containers[0].image,RESTARTS:.status.containerStatuses[0].restartCount,START:.status.startTime

Expected:

NAME                IMAGE                             RESTARTS   START
probebau-qdrant-0   docker.io/qdrant/qdrant:v1.20.3   0          2026-12-06T07:17:25Z
probebau-qdrant-1   docker.io/qdrant/qdrant:v1.20.3   0          2026-12-06T07:16:59Z
probebau-qdrant-2   docker.io/qdrant/qdrant:v1.20.3   0          2026-12-06T07:16:37Z

Solution: rollout status checks the StatefulSet as it is right now. At 07:16:26 Argo CD had not yet applied the commit (OutOfSync); the StatefulSet was unchanged and fully rolled out – hence “complete”. It was only applied at 07:16:31. The same happened when creating the test build: rollout status came back with NotFound because the StatefulSet did not exist yet. The right way to wait is with Argo CD: argocd app wait <app> --sync --health --timeout <s> (Drill 9) – it only returns when exactly this state has been applied and is healthy, and otherwise ends with an error.

Checkpoint

# on vdb1
~/werkbank/bin/argocd app list --kube-context argocd

Expected (shortened on the right):

NAME           CLUSTER                         NAMESPACE  PROJECT  STATUS  HEALTH   SYNCPOLICY  CONDITIONS
argocd/qdrant  https://kubernetes.default.svc  qdrant     default  Synced  Healthy  Manual      <none>
argocd/regeln  https://kubernetes.default.svc  qdrant     default  Synced  Healthy  Auto        <none>
# on vdb1
kubectl -n qdrant get pods -o wide

Expected (shortened on the right):

NAME       READY   STATUS    RESTARTS   AGE   IP           NODE
qdrant-0   1/1     Running   0          30m   10.42.1.70   vdb2
qdrant-1   1/1     Running   0          31m   10.42.3.9    vdb4
qdrant-2   1/1     Running   0          32m   10.42.2.19   vdb3
# on vdb1
curl -sS --cacert ../tag10/ca.crt -H "api-key: $(cat ../tag10/admin-key)" https://10.43.151.237:6333/cluster -o cluster-nachher.json
# on vdb1
jq -c "{peers: (.result.peers|length), raft: .result.raft_info, fehler: .result.message_send_failures}" cluster-nachher.json

Expected:

{"peers":3,"raft":{"term":339,"commit":225,"pending_operations":0,"leader":857928665674298,"role":"Follower","is_voter":true},"fehler":{}}

In addition, doku with 13,220 and glove with 1,183,514 points, both green (GET /collections/<name>). helm -n qdrant list is empty, and kubectl -n longhorn-system get volumes.longhorn.io again shows the four volumes from before, all healthy. Argo CD needs about 200 MiB on vdb1 (kubectl -n argocd top pods: 157 + 32 + 5 Mi).

Test yourself

  1. During the takeover, argocd app diff only shows a changed checksum in the pod template. Why is that not enough for you as approval?
  2. A chart reads a key from a Secret with lookup. What happens under Argo CD, and how do you work around it?
  3. You remove a volume from the Helm values, Argo CD reports Synced – but the volume is still in the StatefulSet. Why?
  4. Which collections throw errors during a rolling update, and why?
  5. An upgrade hangs; Argo CD shows Synced and Progressing. What do you check, and how do you go back?
  6. After a downgrade, everything runs in the lab. May you do the same in production?

Answers:

  1. The diff hides Secret values. The checksum revealed that qdrant-apikey is rendered differently – helm template showed an empty data:. A sync would have removed the keys and restarted all pods.
  2. lookup queries the cluster and is always empty with helm template; that is how Argo CD renders. Pass the value without the chart: here as an environment variable with secretKeyRef – without a line break in the Secret.
  3. Argo CD applies like kubectl apply and only removes fields it set itself. Fields that Helm set remain. Replace once with argocd app sync --resource … --replace.
  4. Collections with replication factor 1: while a pod restarts, its shard is missing. glove had 186 errors in three blocks of about 41 s; doku with two copies had none.
  5. kubectl get pods and the events of the hanging pod (here ImagePullBackOff, tag not found). Go back with git revert and argocd app wait --sync --health – with Parallel, the controller replaced the pod by itself.
  6. No. The documentation only describes upgrades, and snapshots only into the same or the next minor version. What worked in the lab with 3000 points is untested. The way back is the snapshot from before the upgrade.

Interview note

“How do you run a vector database with GitOps?” – Values files in Git, the chart from the vendor’s repository, Secrets only as references. Argo CD reports drift; I switch on selfHeal for policies, but not for the database itself – there I start every rollout deliberately. When taking over a Helm installation, I ran into two traps: lookup in the chart produced an empty Secret under Argo CD, and Argo CD does not remove fields that Helm set. Neither was visible in the diff; I checked with helm template and managedFields. An upgrade is a commit, but downtime-free only with two copies per shard: during the rollout, a collection with replication factor 1 had errors three times for a good 40 seconds, the one with two copies none. And a git revert resets the plan, not the data.

Enterprise note

In production, the Applications are in Git too (“app of apps” or ApplicationSets), so that the chart version itself is a commit and nobody needs kubectl apply by hand. The planning archive is a Git server with mandatory reviews and protected branches; Argo CD gets a read-only key, and a webhook replaces the poll every three minutes. Secrets come via an External Secrets Operator or Sealed Secrets from a vault – never in plain text in the repository.

For the database: sync windows (syncWindows) only during maintenance periods, selfHeal off, a snapshot job before every sync (as a PreSync hook) and a test build with a copy of the production data in which every upgrade runs first. Upgrades minor by minor, each to the latest patch level, and only then the client SDKs. Collections without a second copy are listed in the maintenance announcement – they go down during the rollout.

Summary

  • Backup beforehand: shard snapshot of doku at the peer with the shard, 51 MB in the off-site store.
  • Planning archive: bare repository /srv/git/bibliothek.git, user git with git-shell, key argocd-lesen with restrict; safe.directory for the local working copy.
  • Argo CD 3.6.4 (chart 10.20.4) as a core installation on vdb1: controller, repo server, Redis, about 200 MiB. applicationSet.enabled does not exist – Helm stayed silent; replicas: 0 works.
  • The CLI in core mode needs --kube-context argocd, otherwise configmap "argocd-cm" not found.
  • Takeover: lookup in the Qdrant chart resulted in an empty qdrant-apikey under Argo CD. Solution: QDRANT__SERVICE__API_KEY/…READ_ONLY_API_KEY from the Secret qdrant-zugang (without a line break).
  • Argo CD did not remove Helm fields (volume qdrant-secret): one-time sync --replace only for the StatefulSet. Rollout 2:52 min: doku (2 copies) 0 errors, glove (1 copy) 186 errors in three blocks of about 41 s.
  • Helm release Secrets (v12–v21) and qdrant-apikey deleted; helm list empty.
  • Drift: a deleted NetworkPolicy locked out the workbench; with selfHeal back in under a second. Qdrant stays manual; drift on the PDB visible in the diff.
  • Test build 1.19.2 → 1.20.3 via commit: about 1.5 min, 0 errors. v1.20.99: Init:ImagePullBackOff, Synced/Progressing, app wait failed after 180 s; git revert healed in 22 s without manual work.
  • Ways back 1.20.3 → 1.19.2 → 1.17.1 and snapshot 1.20.3 into 1.19.2 worked in the lab – according to the documentation not supported or not described.
  • rollout status right after the push reports the old state; the right way is argocd app wait --sync --health.

Commands at a glance

Command Purpose
git init --bare --shared=group --initial-branch=main <path> create a repository to push to
restrict <public key> in authorized_keys key without forwarding and terminal
git config --global --add safe.directory <path> allow another user’s repository
GIT_SSH_COMMAND="ssh -i <key>" git ls-remote <url> test read access with a specific key
helm install argocd argo/argo-cd -f <values> install Argo CD (server.enabled: false = core)
argocd login --core --kube-context argocd CLI in core mode
kubectl label secret <name> argocd.argoproj.io/secret-type=repository repository credentials for Argo CD
argocd app get <app> --refresh fetch state and new commit immediately
argocd app diff <app> difference Git ↔︎ cluster (without Secret values)
argocd app sync <app> [--resource g:k:n] [--replace] apply, individually, replace
argocd app wait <app> --sync --health --timeout <s> wait until applied and healthy
helm template … --show-only templates/<file> render like Argo CD, without a cluster
kubectl get <obj> --show-managed-fields -o jsonpath=… who set which fields
kubectl -n <ns> delete secret -l owner=helm,name=<release> delete Helm’s release memory
git revert --no-edit <commit> revert a plan amendment

Contents

More