Day 10: Security – ID cards, seals and a gatekeeper
Goal: take Qdrant from “anyone in the cluster may do anything” to “only those with an ID card, and only as much as necessary”: API keys and read-only keys, short-lived JWTs for a single collection, TLS with cert-manager for clients and between the peers, NetworkPolicies and the Pod Security Standard
restricted· Duration: about 150 min · Prerequisite: Day 0 to Day 9
State before this chapter
Three Qdrant pods are running with a 2 Gi memory limit, Helm revision 15.
# on vdb1
kubectl -n qdrant get pods -o wideExpected (your IPs and ages will differ):
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
qdrant-0 1/1 Running 0 22m 10.42.2.10 vdb3 <none> <none>
qdrant-1 1/1 Running 0 20m 10.42.3.24 vdb4 <none> <none>
qdrant-2 1/1 Running 0 22m 10.42.1.38 vdb2 <none> <none>
The collections doku, glove and
verteilt from Days 2, 5 and 8 are there. Until today nobody
has asked for an ID card: every call in this course ran without a key over
plain HTTP. The values file from Day 9 is in
~/labor/tag09/qdrant-werte.yaml, the read script
lesen.py from Day 6 in ~/labor/tag06.
Introduction
An unprotected vector database is worse than an open relational
database. It holds the texts themselves as payload – manuals, tickets,
contracts – and a DELETE on a collection wipes out in one
second what cost hours of embedding compute time. Qdrant starts without
a key, without TLS and listens on all addresses. That is convenient in
the lab and dangerous in any cluster where other applications run as
well.
Today you lock up the library layer by layer – and along the way you
experience two places where a harmless helm upgrade brings
the cluster to a halt. Both have the same cause: the peers talk to each
other, and whoever changes the language of one peer has to switch all of
them at the same time.
Today you will learn:
- to prove that a foreign pod in any namespace can read, create and delete collections,
- to generate an admin key and a read-only key securely and mount them as a Secret,
- why the rollout with a key gets stuck and how you resolve it,
- to issue short-lived JWTs that allow only one collection and only reading,
- to create your own CA and a server certificate with cert-manager and turn on TLS,
- why TLS between the peers sends a running cluster into CrashLoop – and how you rescue it,
- to restrict Qdrant with NetworkPolicies to peers, approved pods and the workbench,
- to secure the namespace with the Pod Security Standard
restricted.
Background
The picture of the day: ID cards, seals and a gatekeeper
Until now the city library was an open house: anyone could walk in, take books and – worse – empty entire shelves. Today it gets some order.
- The master key (API key) opens everything: creating holdings, rearranging, deleting. Only the librarians have it.
- The reader’s card (read-only key) allows reading in all departments, but no clearing out.
- The day pass (JWT) is issued at the counter: only the “doku” department, only reading, valid until tonight. The librarian stamps it with the master key – only someone who has the master key can forge it.
- The seal (TLS) closes every courier case so that nobody reads along on the way. The seal office (cert-manager with its own CA) issues the seals and renews them before they expire. A visitor who does not know the seal office cannot tell a genuine seal from a fake one.
- The library council has an address book of its members (the stored peer addresses). Whoever switches the council’s letters to sealed mail also has to change the address book.
- The gatekeeper (NetworkPolicy) lets through the door only those on his list – no matter which ID card they carry.
- The house rules for tradespeople (Pod Security Standard) forbid tools that can do more than necessary: no master key for the whole building (root), no high-voltage equipment (capabilities).
The terms
| Term | Meaning | In the picture |
|---|---|---|
| API key | shared secret in the api-key header, allows
everything |
master key |
| read-only key | read_only_api_key, allows only read calls |
reader’s card |
| JWT | signed token with permissions and expiry time, header
Authorization: Bearer … |
day pass with stamp |
jwt_rbac |
Qdrant checks JWTs signed with the API key (HS256) | counter issues day passes |
| CA | certificate authority whose certificate clients trust | seal office |
| cert-manager | Kubernetes operator that issues and renews certificates | seal office with a calendar |
| p2p | internal connection between the peers on port 6335 (Raft, forwarding) | the council’s letters |
| NetworkPolicy | rule about which pods and addresses may reach a pod | gatekeeper |
| Pod Security Standard | levels privileged, baseline,
restricted for the pods of a namespace |
house rules |
Remember: An ID card alone is not enough, and neither is a gatekeeper alone. Keys, seals, gatekeeper and house rules cover different attacks – only together is the library locked up.
Drill 1: The open door
Where you are: on vdb1.
What you have afterwards: proof that any pod in another namespace can read and modify Qdrant.
Step 1 – create the working folder.
# on vdb1
mkdir -p ~/labor/tag10Step 2 – read as a stranger. You start a throwaway
pod in the default namespace that has nothing to do with
Qdrant, and query the list of collections.
# on vdb1
kubectl run eindringling -n default --rm -i --restart=Never --image=curlimages/curl:8.11.1 -- curl -s http://qdrant.qdrant:6333/collections| Item | Value | Meaning |
|---|---|---|
run eindringling |
name | starts a single pod |
-n default |
namespace | deliberately a foreign namespace |
--rm -i |
show the output, delete the pod afterwards | |
--restart=Never |
a plain pod, not a Deployment | |
--image |
curlimages/curl:8.11.1 |
small image with curl |
-- curl -s … |
the command in the pod; qdrant.qdrant is the
qdrant service in the qdrant namespace |
Expected (the two notice lines from
kubectl appear with every run -i):
{"result":{"collections":[{"name":"doku"},{"name":"glove"},{"name":"verteilt"}]},"status":"ok","time":0.000070519}All commands and output from this session will be recorded in container logs, including credentials and sensitive information passed through the command prompt.
If you don't see a command prompt, try pressing enter.
pod "eindringling" deleted from default namespace
Step 3 – write as a stranger. Reading is bad enough. Can the stranger also create holdings?
# on vdb1
kubectl run eindringling -n default --rm -i --restart=Never --image=curlimages/curl:8.11.1 -- curl -s -X PUT http://qdrant.qdrant:6333/collections/einbruch -H 'Content-Type: application/json' -d '{"vectors":{"size":4,"distance":"Cosine"}}'-X PUT …/collections/einbruchcreates a collection,-ddescribes four dimensions with cosine.
Expected (excerpt):
{"result":true,"status":"ok","time":1.600456335}pod "eindringling" deleted from default namespace
# on vdb1
curl -s http://10.43.151.237:6333/collectionsExpected:
{"result":{"collections":[{"name":"doku"},{"name":"einbruch"},{"name":"glove"},{"name":"verteilt"}]},"status":"ok","time":0.000037251}
Whoever may create may also delete – you clean up yourself:
# on vdb1
curl -s -X DELETE http://10.43.151.237:6333/collections/einbruchExpected:
{"result":true,"status":"ok","time":0.218404756}
Step 4 – what the namespace allows. Pod Security Admission reads labels on the namespace.
# on vdb1
kubectl get ns qdrant --show-labelsExpected:
NAME STATUS AGE LABELS
qdrant Active 30h kubernetes.io/metadata.name=qdrant,name=qdrant
No pod-security.kubernetes.io/… label – in this
namespace any pod may run, even one as root.
Step 5 – what the Qdrant container brings along itself.
# on vdb1
kubectl -n qdrant get pod qdrant-0 -o jsonpath='{.spec.containers[0].securityContext}{"\n"}{.spec.initContainers[0].name} {.spec.initContainers[0].securityContext}{"\n"}'- The first line shows the
securityContextof the Qdrant container, the second the name andsecurityContextof the init container.
Expected:
{"allowPrivilegeEscalation":false,"privileged":false,"readOnlyRootFilesystem":true,"runAsGroup":2000,"runAsNonRoot":true,"runAsUser":1000}
ensure-dir-ownership
The Qdrant container is already in good shape: no root, file system
read-only. The init container ensure-dir-ownership, by
contrast, has no securityContext at all – it runs as root
and uses chown to change the owners on the volumes. You
come back to this in Drill 7.
Remember: “Inside the cluster” is no protection. Every pod in every namespace reaches a service via
<name>.<namespace>– without a key and without a gatekeeper the library is an open shelf.
Save your progress? Sign up for free
Drill 2: Master key and reader’s card
Where you are: on vdb1, in
~/labor/tag10.What you have afterwards: an admin key and a read-only key in the Secret
qdrant-schluessel, Qdrant with both, and the error patterns 401 and 403.
Step 1 – generate two keys. A good key is long and
random. openssl rand reads from the kernel’s random number
generator.
# on vdb1
cd ~/labor/tag10# on vdb1
openssl rand -hex -out admin-key 32-hexwrites the bytes as hexadecimal numbers,-out admin-keyinto a file instead of onto the screen.32is the number of random bytes, i.e. 256 bits, as 64 hex characters.
The options come before the number –
openssl rand -hex 32 -out admin-key aborts with
rand: Use -help for summary.
# on vdb1
openssl rand -hex -out lese-key 32# on vdb1
chmod 600 admin-key lese-key600means: only the owner may read and write.
# on vdb1
ls -lExpected:
total 8
-rw------- 1 ubuntu ubuntu 65 Dec 6 00:15 admin-key
-rw------- 1 ubuntu ubuntu 65 Dec 6 00:15 lese-key
65 bytes: 64 characters and a line break. This course never shows the
keys themselves – you should not pull them onto the screen with
cat either, but only insert them into commands.
Step 2 – store the keys as a Secret.
# on vdb1
kubectl -n qdrant create secret generic qdrant-schluessel --from-file=admin=admin-key --from-file=lesen=lese-key--from-file=admin=admin-keystores the content of the file under the keyadmin. Via a file, the value does not end up in the shell history, unlike with--from-literal.
Expected:
secret/qdrant-schluessel created
Step 3 – extend the values file. You copy the file from Day 9 and append two sections.
# on vdb1
cp ~/labor/tag09/qdrant-werte.yaml ~/labor/tag10/qdrant-werte.yaml# on vdb1
nano qdrant-werte.yamlimage:
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
persistence:
size: 4Gi
storageClassName: longhorn
startupProbe:
enabled: true
livenessProbe:
enabled: true
config:
telemetry_disabled: true
podDisruptionBudget:
enabled: true
maxUnavailable: 1
apiKey:
valueFrom:
secretKeyRef:
name: qdrant-schluessel
key: admin
readOnlyApiKey:
valueFrom:
secretKeyRef:
name: qdrant-schluessel
key: lesen| Item | Value | Meaning |
|---|---|---|
apiKey.valueFrom.secretKeyRef |
qdrant-schluessel / admin |
read the admin key from the Secret |
readOnlyApiKey.valueFrom.secretKeyRef |
qdrant-schluessel / lesen |
read the read-only key from the Secret |
The chart reads the Secret when rendering and writes its own
configuration file local.yaml from it – you will see what
that means for secrecy in Step 9.
Step 4 – roll out.
# on vdb1
helm upgrade qdrant qdrant/qdrant --version 1.20.3 -n qdrant -f qdrant-werte.yamlExpected (excerpt):
Release "qdrant" has been upgraded. Happy Helming!
NAME: qdrant
LAST DEPLOYED: Sun Dec 6 00:15:56 2026
NAMESPACE: qdrant
STATUS: deployed
REVISION: 16
# on vdb1
kubectl -n qdrant rollout status statefulset qdrant --timeout=5m--timeout=5maborts after five minutes instead of waiting forever.
Expected – after five minutes:
Waiting for 1 pods to be ready...
error: timed out waiting for the condition
The rollout is stuck.
Step 5 – why the new pod does not become ready.
# on vdb1
kubectl -n qdrant get podsExpected:
NAME READY STATUS RESTARTS AGE
qdrant-0 1/1 Running 0 29m
qdrant-1 1/1 Running 0 28m
qdrant-2 0/1 Running 0 5m4s
The StatefulSet replaces from back to front: qdrant-2 is
already running with the key, but is not ready.
# on vdb1
kubectl -n qdrant logs qdrant-2 -c qdrant --tail=2Expected:
2026-12-06T00:19:42.425803Z INFO qdrant::tonic::logging: gRPC /qdrant.Raft/Send failed with The request does not have valid authentication credentials 0.000126
2026-12-06T00:19:42.426716Z INFO qdrant::tonic::logging: gRPC /qdrant.Raft/Send failed with The request does not have valid authentication credentials 0.000266
Here is the surprise of the day: Qdrant also uses the API key to
protect the internal Raft connection between the peers.
qdrant-2 now demands the key from its fellow council
members too – and qdrant-0 and qdrant-1 do not
know it yet. The new pod receives no messages from the council, its
shards do not become ready:
# on vdb1
curl -s -i http://10.42.1.41:6333/readyz10.42.1.41is the IP of the newqdrant-2– insert yours fromkubectl get pods -o wide.-ishows the response headers with the status code.
Expected:
HTTP/1.1 503 Service Unavailable
content-length: 25
content-type: text/plain; charset=utf-8
vary: Origin, Access-Control-Request-Method, Access-Control-Request-Headers
date: Sun, 06 Dec 2026 00:19:56 GMT
some shards are not ready
And the old pods? They keep answering – without a key:
# on vdb1
curl -s http://10.43.151.237:6333/collectionsExpected:
{"result":{"collections":[{"name":"doku"},{"name":"glove"},{"name":"verteilt"}]},"status":"ok","time":0.000063149}
The rollout waits for qdrant-2, qdrant-2
waits for the others. This never resolves itself.
Step 6 – replace the two old pods at the same time. The solution is to switch all council members at once. The data lives on the Longhorn volumes; a deleted pod starts with the new template.
# on vdb1
kubectl -n qdrant delete pod qdrant-0 qdrant-1delete podis not an eviction, so the PDB from Day 6 does not stop it. For a moment no copy is ready – that is the price.
Expected:
pod "qdrant-0" deleted from qdrant namespace
pod "qdrant-1" deleted from qdrant namespace
# on vdb1
kubectl -n qdrant rollout status statefulset qdrant --timeout=5mExpected:
Waiting for 3 pods to be ready...
Waiting for 2 pods to be ready...
Waiting for 1 pods to be ready...
partitioned roll out complete: 3 new pods have been updated...
After a good minute all three are ready.
Step 7 – without a key.
# on vdb1
curl -s -i http://10.43.151.237:6333/collectionsExpected:
HTTP/1.1 401 Unauthorized
content-length: 56
vary: Origin, Access-Control-Request-Method, Access-Control-Request-Headers
date: Sun, 06 Dec 2026 00:22:35 GMT
Must provide an API key or an Authorization bearer token
401 means: who are you? The health endpoints /readyz,
/livez and /healthz stay open, otherwise the
kubelet could not check.
Step 8 – with the reader’s card. The shell inserts
the key directly into the header with $(cat …) – so it does
not appear on the screen.
# on vdb1
curl -s -H "api-key: $(cat ~/labor/tag10/lese-key)" http://10.43.151.237:6333/collections-H "api-key: …"is the header Qdrant expects for keys.
Expected:
{"result":{"collections":[{"name":"doku"},{"name":"glove"},{"name":"verteilt"}]},"status":"ok","time":0.000068105}
And now the attempt to create holdings with the reader’s card:
# on vdb1
curl -s -i -X PUT -H "api-key: $(cat ~/labor/tag10/lese-key)" -H "Content-Type: application/json" http://10.43.151.237:6333/collections/einbruch -d "{\"vectors\":{\"size\":4,\"distance\":\"Cosine\"}}"Expected:
HTTP/1.1 403 Forbidden
content-length: 85
content-type: application/json
vary: Origin, Access-Control-Request-Method, Access-Control-Request-Headers
date: Sun, 06 Dec 2026 00:22:43 GMT
{"status":{"error":"Forbidden: Global manage access is required"},"time":0.000426732}
403 means: I know who you are, but you are not allowed to do that.
With admin-key in the header the same call succeeds –
created in the lab and deleted again right away.
Step 9 – everywhere the key lives.
# on vdb1
kubectl -n qdrant get secret qdrant-apikey -o jsonpath='{.data}' | jq 'keys'jq 'keys'shows only the names of the entries, not the values.
Expected:
[
"api-key",
"local.yaml",
"read-only-api-key"
]
# on vdb1
helm get manifest qdrant -n qdrant | grep -c "api-key:"helm get manifestshows the rendered manifests of the current revision,grep -ccounts only the matches.
Expected:
2
So the key sits in three places: in your Secret, in the Secret
qdrant-apikey that the chart builds from it, and in Helm’s
release Secret. Whoever may read Secrets in the qdrant
namespace has the master key. RBAC on this namespace is therefore part
of protecting the key.
Remember: With an API key, the peers also only talk to each other with an ID card. Whoever turns it on in a running cluster has to switch all council members at the same time – a pod-by-pod rollout gets stuck.
Save your progress? Sign up for free
Drill 3: A day pass for one department
Where you are: on vdb1, in
~/labor/tag10.What you have afterwards: a JWT that may only read
doku, and the error patterns for a foreign collection, writing, expiry and forgery.
A read-only key for everything is often already too much for a search application – it needs exactly one collection. For this, Qdrant checks JWTs: the permissions are in the token, signed with the admin key. Qdrant stores no tokens, it only checks the signature.
Step 1 – turn on JWT checking.
# on vdb1
nano qdrant-werte.yamlimage:
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
persistence:
size: 4Gi
storageClassName: longhorn
startupProbe:
enabled: true
livenessProbe:
enabled: true
config:
telemetry_disabled: true
service:
jwt_rbac: true
podDisruptionBudget:
enabled: true
maxUnavailable: 1
apiKey:
valueFrom:
secretKeyRef:
name: qdrant-schluessel
key: admin
readOnlyApiKey:
valueFrom:
secretKeyRef:
name: qdrant-schluessel
key: lesenconfig.service.jwt_rbac: truemakes Qdrant accept JWTs in theAuthorization: Bearer …header.
# on vdb1
helm upgrade qdrant qdrant/qdrant --version 1.20.3 -n qdrant -f qdrant-werte.yamlExpected (excerpt):
Release "qdrant" has been upgraded. Happy Helming!
NAME: qdrant
LAST DEPLOYED: Sun Dec 6 00:23:39 2026
NAMESPACE: qdrant
STATUS: deployed
REVISION: 17
# on vdb1
kubectl -n qdrant rollout status statefulset qdrant --timeout=5mExpected (excerpt):
Waiting for partitioned roll out to finish: 0 out of 3 new pods have been updated...
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...
This time the rollout goes through: all peers have the same key, only the configuration changes.
Step 2 – a script that stamps day passes. A JWT consists of three Base64 parts: header, payload, signature. The script needs only Python’s standard library.
# on vdb1
nano jwt-erzeugen.py"""Erzeugt ein JWT für Qdrant, signiert mit dem Admin-Schlüssel (HS256)."""
import base64
import hashlib
import hmac
import json
import sys
import time
SCHLUESSELDATEI, COLLECTION, RECHT, MINUTEN = sys.argv[1], sys.argv[2], sys.argv[3], int(sys.argv[4])
def b64(daten: bytes) -> str:
return base64.urlsafe_b64encode(daten).rstrip(b"=").decode()
schluessel = open(SCHLUESSELDATEI).read().strip().encode()
kopf = {"alg": "HS256", "typ": "JWT"}
inhalt = {
"access": [{"collection": COLLECTION, "access": RECHT}],
"exp": int(time.time()) + MINUTEN * 60,
}
teil = b64(json.dumps(kopf).encode()) + "." + b64(json.dumps(inhalt).encode())
signatur = hmac.new(schluessel, teil.encode(), hashlib.sha256).digest()
print(teil + "." + b64(signatur))| Line | Meaning |
|---|---|
SCHLUESSELDATEI, COLLECTION, RECHT, MINUTEN |
four arguments: what to sign with, which collection, r
or rw, how long it is valid |
b64 |
URL-safe Base64 without = at the end – as JWT
requires |
"access": [{"collection": …, "access": …}] |
the permissions: a list of collections with r (read) or
rw |
"exp" |
expiry time in seconds since 1970 |
hmac.new(…, hashlib.sha256) |
the HS256 signature over header and payload |
Step 3 – issue a day pass.
# on vdb1
python3 jwt-erzeugen.py admin-key doku r 60 > doku-lesen.jwtadmin-keysigns,dokuis the only permitted collection,rmeans read only, valid for60minutes.> doku-lesen.jwtwrites the token into a file – a token is a secret too.
No output. Anyone can read what is in the pass – JWTs are signed, not encrypted:
# on vdb1
cut -d. -f2 doku-lesen.jwt | base64 -dcut -d. -f2takes the second part between the dots, the payload;base64 -ddecodes it.
Expected:
{"access": [{"collection": "doku", "access": "r"}], "exp": 1796520375}base64: invalid input
The payload is there in full. invalid input only
complains about the missing = at the end, which JWT
omits.
Step 4 – what the day pass may do. The token goes
into the Authorization: Bearer header.
# on vdb1
curl -s -X POST -H "Authorization: Bearer $(cat ~/labor/tag10/doku-lesen.jwt)" -H "Content-Type: application/json" http://10.43.151.237:6333/collections/doku/points/count -d "{\"exact\":true}"Expected:
{"result":{"count":13220},"status":"ok","time":0.008254837}
# on vdb1
curl -s -X POST -H "Authorization: Bearer $(cat ~/labor/tag10/doku-lesen.jwt)" -H "Content-Type: application/json" http://10.43.151.237:6333/collections/glove/points/count -d "{\"exact\":true}"Expected:
{"status":{"error":"Forbidden: Access to collection glove is required"},"time":0.000043541}
# on vdb1
curl -s -X POST -H "Authorization: Bearer $(cat ~/labor/tag10/doku-lesen.jwt)" -H "Content-Type: application/json" http://10.43.151.237:6333/collections/doku/points/delete -d "{\"points\":[999999]}"Expected:
{"status":{"error":"Forbidden: Write access to collection doku is required"},"time":0.000137626}
# on vdb1
curl -s -H "Authorization: Bearer $(cat ~/labor/tag10/doku-lesen.jwt)" http://10.43.151.237:6333/collectionsExpected:
{"result":{"collections":[{"name":"doku"}]},"status":"ok","time":0.000065506}
The list of collections is filtered: whoever may only read
doku does not even learn that glove
exists.
Step 5 – an expired pass. 0 minutes
means: the expiry time is now.
# on vdb1
python3 jwt-erzeugen.py admin-key doku r 0 > abgelaufen.jwt# on vdb1
curl -s -i -H "Authorization: Bearer $(cat ~/labor/tag10/abgelaufen.jwt)" http://10.43.151.237:6333/collectionsExpected (excerpt):
HTTP/1.1 200 OK
{"result":{"collections":[{"name":"doku"}]},"status":"ok","time":0.000026448}
One second after expiry the token is still accepted – the check
allows a little leeway for clocks that differ. A good minute later
(sleep 70) the same call:
# on vdb1
curl -s -i -H "Authorization: Bearer $(cat ~/labor/tag10/abgelaufen.jwt)" http://10.43.151.237:6333/collectionsExpected:
HTTP/1.1 403 Forbidden
content-length: 16
vary: Origin, Access-Control-Request-Method, Access-Control-Request-Headers
date: Sun, 06 Dec 2026 00:27:51 GMT
ExpiredSignature
Step 6 – a forged pass. Someone who only has the reader’s card could try to use it to stamp a token with write permission:
# on vdb1
python3 jwt-erzeugen.py lese-key doku rw 60 > gefaelscht.jwt# on vdb1
curl -s -i -H "Authorization: Bearer $(cat ~/labor/tag10/gefaelscht.jwt)" http://10.43.151.237:6333/collectionsExpected:
HTTP/1.1 403 Forbidden
content-length: 16
vary: Origin, Access-Control-Request-Method, Access-Control-Request-Headers
date: Sun, 06 Dec 2026 00:26:34 GMT
InvalidSignature
Only the admin key stamps validly. Conversely, this means: whoever changes the admin key invalidates all issued tokens in one go.
Remember: A day pass carries its own permissions – collection, read or write, expiry time. Anyone can read it, only the master key can stamp it.
Save your progress? Sign up for free
Drill 4: Seals for the clients
Where you are: on vdb1, in
~/labor/tag10.What you have afterwards: cert-manager, your own CA, a server certificate and TLS on ports 6333 (REST) and 6334 (gRPC).
So far, keys and tokens travel across the network in plain text – whoever captures the traffic has the master key. TLS encrypts the connection, and the certificate proves to the client that it is talking to the real Qdrant.
Step 1 – install cert-manager.
# on vdb1
helm install cert-manager oci://quay.io/jetstack/charts/cert-manager --version v1.21.3 -n cert-manager --create-namespace --set crds.enabled=true --wait --timeout 5m| Item | Value | Meaning |
|---|---|---|
oci://quay.io/jetstack/charts/cert-manager |
the chart directly from the OCI registry, without
helm repo add |
|
--version |
v1.21.3 |
fixed version |
-n cert-manager --create-namespace |
its own namespace, created on the fly | |
--set crds.enabled=true |
also installs the CRDs Certificate, Issuer
and others |
|
--wait --timeout 5m |
waits until all pods are ready |
Expected (excerpt):
NAME: cert-manager
LAST DEPLOYED: Sun Dec 6 00:28:08 2026
NAMESPACE: cert-manager
STATUS: deployed
REVISION: 1
DESCRIPTION: Install complete
Step 2 – describe the seal office and the seal. Four objects in one file: a self-signing issuer, with it the CA certificate, an issuer that signs with this CA, and the server certificate for Qdrant.
# on vdb1
nano zertifikate.yamlapiVersion: cert-manager.io/v1
kind: Issuer
metadata:
name: selbst
namespace: qdrant
spec:
selfSigned: {}
---
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: qdrant-ca
namespace: qdrant
spec:
isCA: true
commonName: Stadtbibliothek CA
secretName: qdrant-ca
duration: 87600h
privateKey:
algorithm: ECDSA
size: 256
issuerRef:
kind: Issuer
name: selbst
---
apiVersion: cert-manager.io/v1
kind: Issuer
metadata:
name: bibliothek-ca
namespace: qdrant
spec:
ca:
secretName: qdrant-ca
---
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: qdrant-tls
namespace: qdrant
spec:
secretName: qdrant-tls
duration: 2160h
renewBefore: 360h
privateKey:
algorithm: ECDSA
size: 256
dnsNames:
- qdrant
- qdrant.qdrant.svc
- qdrant.qdrant.svc.cluster.local
- qdrant-0.qdrant-headless
- qdrant-1.qdrant-headless
- qdrant-2.qdrant-headless
ipAddresses:
- 10.43.151.237
issuerRef:
kind: Issuer
name: bibliothek-ca| Item | Value | Meaning |
|---|---|---|
selfSigned: {} |
issuer that signs its own certificate – only for the CA | |
isCA: true |
the certificate may sign others | |
duration (CA) |
87600h |
ten years |
ca.secretName |
qdrant-ca |
the issuer signs with the key and certificate from this Secret |
duration / renewBefore |
2160h / 360h |
valid for 90 days, renewed 15 days before expiry |
privateKey |
ECDSA 256 | short, fast key |
dnsNames |
service and pods | all names under which Qdrant is addressed – the peers need
qdrant-N.qdrant-headless in Drill 5 |
ipAddresses |
10.43.151.237 |
the service IP, because the workbench on vdb1 cannot resolve the cluster names |
# on vdb1
kubectl apply -f ~/labor/tag10/zertifikate.yamlExpected:
issuer.cert-manager.io/selbst created
certificate.cert-manager.io/qdrant-ca created
issuer.cert-manager.io/bibliothek-ca created
certificate.cert-manager.io/qdrant-tls created
# on vdb1
kubectl -n qdrant wait --for=condition=Ready certificate/qdrant-tls --timeout=60sExpected:
certificate.cert-manager.io/qdrant-tls condition met
Step 3 – fetch the CA certificate for the clients.
The Secret qdrant-tls contains three entries:
tls.crt, tls.key and ca.crt. The
workbench only needs ca.crt to trust Qdrant.
# on vdb1
kubectl -n qdrant get secret qdrant-tls -o jsonpath='{.data.ca\.crt}' | base64 -d > ~/labor/tag10/ca.crt{.data.ca\.crt}– the dot in the name is escaped with\;base64 -ddecodes the entry.
# on vdb1
kubectl -n qdrant get secret qdrant-tls -o jsonpath='{.data.tls\.crt}' | base64 -d > ~/labor/tag10/qdrant.crt# on vdb1
openssl x509 -in ~/labor/tag10/qdrant.crt -noout -subject -issuer -enddate -ext subjectAltName-nooutdoes not print the certificate itself, only the requested fields;-ext subjectAltNameshows the names.
Expected:
subject=
issuer=CN = Stadtbibliothek CA
notAfter=Mar 6 00:28:56 2027 GMT
X509v3 Subject Alternative Name: critical
DNS:qdrant, DNS:qdrant.qdrant.svc, DNS:qdrant.qdrant.svc.cluster.local, DNS:qdrant-0.qdrant-headless, DNS:qdrant-1.qdrant-headless, DNS:qdrant-2.qdrant-headless, IP Address:10.43.151.237
No subject – today only the alternative names count. Issued by the Stadtbibliothek CA, valid for 90 days.
Step 4 – turn on TLS for REST and gRPC. The Secret is mounted as a volume, the configuration points to the files.
# on vdb1
nano qdrant-werte.yamlimage:
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
persistence:
size: 4Gi
storageClassName: longhorn
startupProbe:
enabled: true
livenessProbe:
enabled: true
config:
telemetry_disabled: 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
apiKey:
valueFrom:
secretKeyRef:
name: qdrant-schluessel
key: admin
readOnlyApiKey:
valueFrom:
secretKeyRef:
name: qdrant-schluessel
key: lesen
additionalVolumes:
- name: tls
secret:
secretName: qdrant-tls
additionalVolumeMounts:
- name: tls
mountPath: /qdrant/tls
readOnly: true| Item | Value | Meaning |
|---|---|---|
service.enable_tls |
true |
TLS on client ports 6333 and 6334 |
tls.cert / tls.key |
paths in the pod | the server’s certificate and private key |
tls.ca_cert |
path in the pod | the CA that Qdrant itself trusts (for Drill 5) |
tls.cert_ttl |
3600 |
Qdrant reloads the certificate every hour – this way a renewal by cert-manager takes effect without a restart |
additionalVolumes /
additionalVolumeMounts |
Secret qdrant-tls |
puts the three files into /qdrant/tls |
With enable_tls, the chart switches the probes to
scheme: HTTPS by itself.
# on vdb1
helm upgrade qdrant qdrant/qdrant --version 1.20.3 -n qdrant -f qdrant-werte.yamlExpected (excerpt):
Release "qdrant" has been upgraded. Happy Helming!
LAST DEPLOYED: Sun Dec 6 00:29:16 2026
STATUS: deployed
REVISION: 18
# on vdb1
kubectl -n qdrant rollout status statefulset qdrant --timeout=5mExpected (excerpt):
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 rollout goes through because the peers still talk to each other over port 6335 without TLS. The log confirms this:
# on vdb1
kubectl -n qdrant logs qdrant-0 -c qdrant | grep 'TLS'Expected:
2026-12-06T00:31:45.350595Z INFO qdrant::tonic: TLS disabled for internal gRPC API
2026-12-06T00:31:45.416252Z INFO qdrant::actix: TLS enabled for REST API (TTL: 3600)
2026-12-06T00:31:45.462346Z INFO qdrant::tonic: TLS enabled for gRPC API (TTL not supported)
REST and gRPC with TLS, the internal connection without. On the gRPC
port, Qdrant does not reload a renewed certificate by itself
(TTL not supported).
Step 5 – three attempts. -sS shows
error messages even though -s suppresses the progress
output.
# on vdb1
curl -sS -H "api-key: $(cat ~/labor/tag10/lese-key)" http://10.43.151.237:6333/collectionsExpected:
curl: (1) Received HTTP/0.9 when not allowed
To plain text, Qdrant now answers with TLS bytes that
curl cannot read as HTTP.
# on vdb1
curl -sS -H "api-key: $(cat ~/labor/tag10/lese-key)" https://10.43.151.237:6333/collectionsExpected:
curl: (60) SSL certificate problem: unable to get local issuer certificate
More details here: https://curl.se/docs/sslcerts.html
curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.
curl does not know the Stadtbibliothek CA. The
temptation is called -k – it switches off verification and
with it half the benefit of TLS. The right way is to pass the CA
along:
# on vdb1
curl -sS --cacert ~/labor/tag10/ca.crt -H "api-key: $(cat ~/labor/tag10/lese-key)" https://10.43.151.237:6333/collections--cacerttrusts the given CA for this call.
Expected:
{"result":{"collections":[{"name":"doku"},{"name":"glove"},{"name":"verteilt"}]},"status":"ok","time":0.000138607}
Remember: A seal is only useful if the recipient knows the seal office. Give clients the CA (
--cacert,ca.crt) –-kopens the case for anyone who steps in between.
Save your progress? Sign up for free
Drill 5: The council seals too – and the address book
Where you are: on vdb1, in
~/labor/tag10.What you have afterwards: TLS on port 6335 between the peers as well – after a real outage and a repair of the stored peer addresses.
Port 6335 carries Raft and the forwarding of requests between the peers, and therefore the points themselves. Since Drill 2 these connections have been protected by the key, but not encrypted.
Step 1 – look at the stored addresses.
# on vdb1
curl -sS --cacert ~/labor/tag10/ca.crt -H "api-key: $(cat ~/labor/tag10/admin-key)" https://10.43.151.237:6333/cluster | jq -c '.result.peers'Expected:
{"1485700002748332":{"uri":"http://qdrant-2.qdrant-headless:6335/"},"857928665674298":{"uri":"http://qdrant-1.qdrant-headless:6335/"},"121400021250061":{"uri":"http://qdrant-0.qdrant-headless:6335/"}}
Make a note of the http:// – it is the key to what
happens next.
Step 2 – turn on p2p TLS. You know from Drill 2: if the language of the peers changes, a pod-by-pod rollout gets stuck. That is why this time you switch all three at once right away.
# on vdb1
nano qdrant-werte.yamlimage:
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
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
apiKey:
valueFrom:
secretKeyRef:
name: qdrant-schluessel
key: admin
readOnlyApiKey:
valueFrom:
secretKeyRef:
name: qdrant-schluessel
key: lesen
additionalVolumes:
- name: tls
secret:
secretName: qdrant-tls
additionalVolumeMounts:
- name: tls
mountPath: /qdrant/tls
readOnly: truecluster.p2p.enable_tls: trueencrypts port 6335. The chart then starts the pods with--uri https://qdrant-N.qdrant-headless:6335.
# on vdb1
helm upgrade qdrant qdrant/qdrant --version 1.20.3 -n qdrant -f qdrant-werte.yamlExpected (excerpt):
Release "qdrant" has been upgraded. Happy Helming!
LAST DEPLOYED: Sun Dec 6 00:32:36 2026
STATUS: deployed
REVISION: 19
# on vdb1
kubectl -n qdrant delete pod qdrant-0 qdrant-1 qdrant-2Expected:
pod "qdrant-0" deleted from qdrant namespace
pod "qdrant-1" deleted from qdrant namespace
pod "qdrant-2" deleted from qdrant namespace
# on vdb1
kubectl -n qdrant rollout status statefulset qdrant --timeout=5mExpected – after five minutes:
Waiting for 3 pods to be ready...
error: timed out waiting for the condition
Step 3 – the outage.
# on vdb1
kubectl -n qdrant get podsExpected:
NAME READY STATUS RESTARTS AGE
qdrant-0 0/1 CrashLoopBackOff 5 (5s ago) 5m7s
qdrant-1 0/1 CrashLoopBackOff 5 (5s ago) 5m7s
qdrant-2 0/1 CrashLoopBackOff 5 (34s ago) 5m9s
All three pods crash. The library is closed.
# on vdb1
kubectl -n qdrant logs qdrant-1 -c qdrant --previous | grep -E 'WARN|Panic'--previousshows the log of the crashed run.
Expected (excerpt – the last matches):
2026-12-06T00:37:43.335370Z WARN qdrant::consensus: Failed to recover from peer with id 121400021250061 at http://qdrant-0.qdrant-headless:6335/ with error Err(Failed to create timeout channel
2026-12-06T00:37:43.335695Z WARN qdrant::consensus: Retrying recovering from known peers (retry 3)
2026-12-06T00:37:46.369691Z ERROR qdrant::startup: Panic backtrace:
2026-12-06T00:37:46.369874Z ERROR qdrant::startup: Panic occurred in file src/main.rs at line 646: Can't initialize consensus: Failed to recover Consensus from existing Raft state
There it is: at http://qdrant-0.qdrant-headless:6335/. A
peer with existing Raft state ignores the start address and reports to
its colleagues at the stored addresses – and those begin with
http://. With TLS turned on, it cannot establish a
connection there, and after three attempts it gives up. Because the same
happens to all three, none of them reaches the others. The council’s
address book is out of date.
The quick way out would be helm rollback to revision 18.
You take the path that keeps TLS: you rewrite the address book, on all
three volumes, while no Qdrant is running.
Step 4 – stop Qdrant.
# on vdb1
kubectl -n qdrant scale statefulset qdrant --replicas=0Expected:
statefulset.apps/qdrant scaled
# on vdb1
kubectl -n qdrant wait --for=delete pod/qdrant-0 pod/qdrant-1 pod/qdrant-2 --timeout=2mExpected (you may also see three lines):
pod/qdrant-1 condition met
pod/qdrant-2 condition met
Step 5 – a workshop pod with all three volumes. A
Longhorn volume with ReadWriteOnce is only ever attached to
one node – but a single pod may mount all three.
# on vdb1
nano werkstatt.yamlapiVersion: v1
kind: Pod
metadata:
name: werkstatt
namespace: qdrant
spec:
containers:
- name: werkstatt
image: busybox:1.37
command: ["sleep", "3600"]
volumeMounts:
- name: v0
mountPath: /v0
- name: v1
mountPath: /v1
- name: v2
mountPath: /v2
volumes:
- name: v0
persistentVolumeClaim:
claimName: qdrant-storage-qdrant-0
- name: v1
persistentVolumeClaim:
claimName: qdrant-storage-qdrant-1
- name: v2
persistentVolumeClaim:
claimName: qdrant-storage-qdrant-2claimNameare the PVCs that the StatefulSet created for each pod;/v0to/v2are the mount points.
# on vdb1
kubectl apply -f ~/labor/tag10/werkstatt.yamlExpected:
pod/werkstatt created
# on vdb1
kubectl -n qdrant wait --for=condition=Ready pod/werkstatt --timeout=3mExpected:
pod/werkstatt condition met
Step 6 – read the address book on all three volumes.
The Raft state is in raft_state.json in the root directory
of each volume.
# on vdb1
kubectl -n qdrant exec werkstatt -- grep -o 'http[s]*://[^"]*' /v0/raft_state.json /v1/raft_state.json /v2/raft_state.jsongrep -oshows only the matching part: everything fromhttp://orhttps://up to the next quotation mark.
Expected:
/v0/raft_state.json:http://qdrant-2.qdrant-headless:6335/
/v0/raft_state.json:http://qdrant-1.qdrant-headless:6335/
/v0/raft_state.json:http://qdrant-0.qdrant-headless:6335/
/v1/raft_state.json:http://qdrant-2.qdrant-headless:6335/
/v1/raft_state.json:http://qdrant-1.qdrant-headless:6335/
/v1/raft_state.json:http://qdrant-0.qdrant-headless:6335/
/v2/raft_state.json:http://qdrant-2.qdrant-headless:6335/
/v2/raft_state.json:http://qdrant-0.qdrant-headless:6335/
/v2/raft_state.json:http://qdrant-1.qdrant-headless:6335/
Nine entries: every peer has the whole address book.
Step 7 – bring the files to the workbench.
kubectl cp copies out of the container using
tar.
# on vdb1
kubectl cp qdrant/werkstatt:/v0/raft_state.json ~/labor/tag10/raft-0.jsonExpected:
tar: removing leading '/' from member names
The message is harmless. The same for the other two:
# on vdb1
kubectl cp qdrant/werkstatt:/v1/raft_state.json ~/labor/tag10/raft-1.json# on vdb1
kubectl cp qdrant/werkstatt:/v2/raft_state.json ~/labor/tag10/raft-2.jsonStep 8 – rewrite the address book. The file is a
single line of JSON. In each of the three files, change the three
addresses from http:// to https:// – nothing
else. For raft-0.json:
# on vdb1
nano raft-0.json{"state":{"hard_state":{"term":328,"vote":0,"commit":197},"conf_state":{"voters":[121400021250061,857928665674298,1485700002748332],"learners":[],"voters_outgoing":[],"learners_next":[],"auto_leave":false}},"latest_snapshot_meta":{"term":0,"index":0},"apply_progress_queue":[198,197],"first_voter":121400021250061,"peer_address_by_id":{"1485700002748332":"https://qdrant-2.qdrant-headless:6335/","857928665674298":"https://qdrant-1.qdrant-headless:6335/","121400021250061":"https://qdrant-0.qdrant-headless:6335/"},"peer_metadata_by_id":{"1485700002748332":{"version":"1.20.3"},"121400021250061":{"version":"1.20.3"},"857928665674298":{"version":"1.20.3"}},"this_peer_id":121400021250061}| Field | Meaning |
|---|---|
hard_state |
term, vote and commit index of the council – do not touch |
conf_state.voters |
the voting peers |
peer_address_by_id |
the address book: peer_id → address. This is the only
place where you change http to https |
this_peer_id |
who this peer itself is – different in every file, so edit each one individually |
You make the same change in raft-1.json and
raft-2.json (nano raft-1.json,
nano raft-2.json). The other fields differ, the three
addresses are the same.
Step 9 – copy back and check.
# on vdb1
kubectl cp ~/labor/tag10/raft-0.json qdrant/werkstatt:/v0/raft_state.json# on vdb1
kubectl cp ~/labor/tag10/raft-1.json qdrant/werkstatt:/v1/raft_state.json# on vdb1
kubectl cp ~/labor/tag10/raft-2.json qdrant/werkstatt:/v2/raft_state.jsonNo output. The check:
# on vdb1
kubectl -n qdrant exec werkstatt -- grep -o 'http[s]*://[^"]*' /v0/raft_state.json /v1/raft_state.json /v2/raft_state.jsonExpected:
/v0/raft_state.json:https://qdrant-2.qdrant-headless:6335/
/v0/raft_state.json:https://qdrant-1.qdrant-headless:6335/
/v0/raft_state.json:https://qdrant-0.qdrant-headless:6335/
/v1/raft_state.json:https://qdrant-2.qdrant-headless:6335/
/v1/raft_state.json:https://qdrant-1.qdrant-headless:6335/
/v1/raft_state.json:https://qdrant-0.qdrant-headless:6335/
/v2/raft_state.json:https://qdrant-2.qdrant-headless:6335/
/v2/raft_state.json:https://qdrant-0.qdrant-headless:6335/
/v2/raft_state.json:https://qdrant-1.qdrant-headless:6335/
Step 10 – workshop gone, Qdrant back on.
# on vdb1
kubectl -n qdrant delete pod werkstattExpected:
pod "werkstatt" deleted from qdrant namespace
# on vdb1
kubectl -n qdrant scale statefulset qdrant --replicas=3Expected:
statefulset.apps/qdrant scaled
# on vdb1
kubectl -n qdrant rollout status statefulset qdrant --timeout=5mExpected:
Waiting for 3 pods to be ready...
Waiting for 2 pods to be ready...
Waiting for 1 pods to be ready...
partitioned roll out complete: 3 new pods have been updated...
Step 11 – check whether the council is in session again.
# on vdb1
curl -sS --cacert ~/labor/tag10/ca.crt -H "api-key: $(cat ~/labor/tag10/admin-key)" https://10.43.151.237:6333/cluster | jq -c '.result|{peers,raft_info,message_send_failures}'Expected:
{"peers":{"1485700002748332":{"uri":"https://qdrant-2.qdrant-headless:6335/"},"121400021250061":{"uri":"https://qdrant-0.qdrant-headless:6335/"},"857928665674298":{"uri":"https://qdrant-1.qdrant-headless:6335/"}},"raft_info":{"term":331,"commit":198,"pending_operations":0,"leader":857928665674298,"role":"Follower","is_voter":true},"message_send_failures":{}}
Three peers with https://, one leader, no send errors.
The log now also reports
TLS enabled for internal gRPC API.
And the data?
# on vdb1
curl -sS --cacert ~/labor/tag10/ca.crt -H "api-key: $(cat ~/labor/tag10/lese-key)" -H 'Content-Type: application/json' -X POST https://10.43.151.237:6333/collections/glove/points/count -d '{"exact":true}'Expected:
{"result":{"count":1183514},"status":"ok","time":0.301160017}
All 1,183,514 points of glove are there,
doku counts 13,220. From deleting the pods to the ready
cluster took a good eight minutes, five of them waiting for the
timeout.
Remember: The council remembers the addresses of its members including
http://. Whoever turns on p2p TLS in an existing cluster has to rewrite the address book on all volumes – for a new cluster,cluster.p2p.enable_tlstherefore belongs in the values file from the start.
Save your progress? Sign up for free
Drill 6: The gatekeeper
Where you are: on vdb1, in
~/labor/tag10.What you have afterwards: three NetworkPolicies – everything closed, peers among themselves, approved pods and the workbench.
Keys protect against strangers without an ID card. Against a stolen
key, the only help is that the thief never even gets to the door. k3s
brings a built-in NetworkPolicy controller for this; Longhorn has had
its own policies in the longhorn-system namespace since Day
0.
Step 1 – close everything.
# on vdb1
nano alles-zu.yamlapiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: alles-zu
namespace: qdrant
spec:
podSelector: {}
policyTypes:
- IngresspodSelector: {}matches every pod in the namespace.policyTypes: [Ingress]withoutingress:rules means: no incoming traffic allowed.
# on vdb1
kubectl apply -f ~/labor/tag10/alles-zu.yamlExpected:
networkpolicy.networking.k8s.io/alles-zu created
# on vdb1
kubectl run eindringling -n default --rm -i --restart=Never --image=curlimages/curl:8.11.1 -- curl -sS -k -m 5 https://qdrant.qdrant:6333/readyz-kis fine here: the pod does not have the CA, and the only question is whether it gets through at all.-m 5aborts after five seconds.
Expected (excerpt):
curl: (7) Failed to connect to qdrant.qdrant port 6333 after 22 ms: Could not connect to server
pod "eindringling" deleted from default namespace
pod default/eindringling terminated (Error)
Rejected after 22 milliseconds, no timeout: the k3s policy controller actively rejects packets instead of silently dropping them. So a “Connection refused” here is no proof that nobody is listening.
The workbench is affected too:
# on vdb1
curl -sS -m 5 --cacert ~/labor/tag10/ca.crt https://10.43.151.237:6333/readyzExpected:
curl: (7) Failed to connect to 10.43.151.237 port 6333 after 1 ms: Couldn't connect to server
The Qdrant pods stay 1/1 Running meanwhile: the
kubelet’s probes come from the pod’s own node, and the controller lets
those through.
Step 2 – where the workbench comes from. For the approval you need the source address with which vdb1 arrives at the pods.
# on vdb1
ip route get 10.42.1.49ip route getshows over which interface and with which source address (src) a packet goes to this pod IP.
Expected:
10.42.1.49 via 10.42.1.0 dev flannel.1 src 10.42.0.0 uid 1000
cache
vdb1 sends over the Flannel network with the source address
10.42.0.0 – the first address of its pod network. This is
the address you approve, not 172.16.0.182.
Step 3 – two approvals.
# on vdb1
nano freigaben.yamlapiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: rat-untereinander
namespace: qdrant
spec:
podSelector:
matchLabels:
app.kubernetes.io/name: qdrant
policyTypes:
- Ingress
ingress:
- from:
- podSelector:
matchLabels:
app.kubernetes.io/name: qdrant
ports:
- port: 6333
- port: 6334
- port: 6335
---
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: leser-und-werkbank
namespace: qdrant
spec:
podSelector:
matchLabels:
app.kubernetes.io/name: qdrant
policyTypes:
- Ingress
ingress:
- from:
- namespaceSelector: {}
podSelector:
matchLabels:
qdrant-zugriff: "ja"
- ipBlock:
cidr: 10.42.0.0/32
ports:
- port: 6333
- port: 6334| Item | Value | Meaning |
|---|---|---|
rat-untereinander |
Qdrant → Qdrant | peers may reach each other on all three ports |
namespaceSelector: {} + podSelector |
in one entry | pods with qdrant-zugriff=ja in any namespace (both
conditions at once) |
ipBlock |
10.42.0.0/32 |
exactly the workbench on vdb1 |
ports |
6333, 6334 | clients get REST and gRPC, but not 6335 |
Policies add up: a packet is allowed if any policy allows it.
alles-zu stays in place and ensures that a future pod in
the namespace without its own approval is closed.
# on vdb1
kubectl apply -f ~/labor/tag10/freigaben.yamlExpected:
networkpolicy.networking.k8s.io/rat-untereinander created
networkpolicy.networking.k8s.io/leser-und-werkbank created
Step 4 – three visitors. The workbench:
# on vdb1
curl -sS -m 5 --cacert ~/labor/tag10/ca.crt https://10.43.151.237:6333/readyzExpected:
all shards are ready
A pod with the label qdrant-zugriff=ja:
# on vdb1
kubectl run leser -n default --labels=qdrant-zugriff=ja --rm -i --restart=Never --image=curlimages/curl:8.11.1 -- curl -sS -k -m 5 https://qdrant.qdrant:6333/readyz--labels=qdrant-zugriff=jasets the label the policy is waiting for.
Expected (excerpt):
curl: (7) Failed to connect to qdrant.qdrant port 6333 after 6 ms: Could not connect to server
pod "leser" deleted from default namespace
pod default/leser terminated (Error)
Rejected – despite the label. The reason is timing: the policy
controller enters a new pod’s IP into its lists only shortly after the
pod starts, and curl was faster. The same pod with five
seconds of patience:
# on vdb1
kubectl run leser -n default --labels=qdrant-zugriff=ja --rm -i --restart=Never --image=curlimages/curl:8.11.1 -- sh -c 'sleep 5; curl -sS -k -m 5 https://qdrant.qdrant:6333/readyz'Expected (excerpt):
all shards are readypod "leser" deleted from default namespace
The intruder without a label stays outside, even with patience:
# on vdb1
kubectl run eindringling -n default --rm -i --restart=Never --image=curlimages/curl:8.11.1 -- sh -c 'sleep 5; curl -sS -k -m 5 https://qdrant.qdrant:6333/readyz'Expected (excerpt):
curl: (7) Failed to connect to qdrant.qdrant port 6333 after 7 ms: Could not connect to server
pod "eindringling" deleted from default namespace
And even the reader cannot get to the council:
# on vdb1
kubectl run leser -n default --labels=qdrant-zugriff=ja --rm -i --restart=Never --image=curlimages/curl:8.11.1 -- sh -c 'sleep 5; curl -sS -k -m 5 https://qdrant-0.qdrant-headless.qdrant:6335/'Expected (excerpt):
curl: (7) Failed to connect to qdrant-0.qdrant-headless.qdrant port 6335 after 8 ms: Could not connect to server
Step 5 – is the council still in session? A new collection with two copies per shard needs all three peers.
# on vdb1
curl -sS --cacert ~/labor/tag10/ca.crt -H "api-key: $(cat ~/labor/tag10/admin-key)" -H 'Content-Type: application/json' -X PUT https://10.43.151.237:6333/collections/probe10 -d '{"vectors":{"size":4,"distance":"Cosine"},"shard_number":3,"replication_factor":2}'Expected:
{"result":true,"status":"ok","time":2.169160957}
Creating a collection is a council decision over port 6335 –
true means the council is in session despite the
gatekeeper. Clean up:
# on vdb1
curl -sS --cacert ~/labor/tag10/ca.crt -H "api-key: $(cat ~/labor/tag10/admin-key)" -X DELETE https://10.43.151.237:6333/collections/probe10Expected:
{"result":true,"status":"ok","time":0.114272758}
Remember: The gatekeeper only lets through those on the list: peers to peers, approved pods and the workbench to the client ports. New pods appear on the list only after a moment – clients need retries at startup.
Save your progress? Sign up for free
Drill 7: The house rules
Where you are: on vdb1, in
~/labor/tag10.What you have afterwards: the
qdrantnamespace under the Pod Security Standardrestricted, Qdrant without a root init container.
Step 1 – trial run. With
--dry-run=server the API server checks the label without
setting it, and reports which running pods would violate it.
# on vdb1
kubectl label --dry-run=server --overwrite ns qdrant pod-security.kubernetes.io/enforce=restrictedExpected:
Warning: existing pods in namespace "qdrant" violate the new PodSecurity enforce level "restricted:latest"
Warning: qdrant-0 (and 2 other pods): allowPrivilegeEscalation != false, unrestricted capabilities, runAsNonRoot != true, seccompProfile
namespace/qdrant labeled (server dry run)
Four violations. allowPrivilegeEscalation and
runAsNonRoot concern the init container from Drill 1, the
other two also the Qdrant container itself.
Step 2 – harden the values file.
# on vdb1
nano qdrant-werte.yamlimage:
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
apiKey:
valueFrom:
secretKeyRef:
name: qdrant-schluessel
key: admin
readOnlyApiKey:
valueFrom:
secretKeyRef:
name: qdrant-schluessel
key: lesen
additionalVolumes:
- name: tls
secret:
secretName: qdrant-tls
additionalVolumeMounts:
- name: tls
mountPath: /qdrant/tls
readOnly: true| Item | Value | Meaning |
|---|---|---|
containerSecurityContext |
the chart defaults plus two fields | Helm merges maps with the chart defaults; the whole block is still there so that the file shows what applies |
capabilities.drop: [ALL] |
the process gets no special kernel privileges | |
seccompProfile: RuntimeDefault |
container and pod | the container runtime’s default filter for system calls |
fsGroup |
3000 |
the volumes belong to group 3000, Qdrant may write |
fsGroupChangePolicy |
OnRootMismatch |
the kubelet changes owners only if the root directory does not match, instead of all files on every start |
updateVolumeFsOwnership |
false |
no more ensure-dir-ownership init container running
chown as root |
# on vdb1
helm upgrade qdrant qdrant/qdrant --version 1.20.3 -n qdrant -f qdrant-werte.yamlExpected (excerpt):
Release "qdrant" has been upgraded. Happy Helming!
LAST DEPLOYED: Sun Dec 6 00:44:32 2026
STATUS: deployed
REVISION: 20
# on vdb1
kubectl -n qdrant rollout status statefulset qdrant --timeout=6mExpected (excerpt):
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...
This time only the pod itself changes, not the language of the peers – the rollout goes through.
Step 3 – put the house rules into force. A second trial run reports no more warnings. Now for real:
# on vdb1
kubectl label --overwrite ns qdrant pod-security.kubernetes.io/enforce=restricted pod-security.kubernetes.io/enforce-version=v1.37enforce=restrictedrejects pods that violate the strictest level.enforce-version=v1.37freezes the rules at the state of this Kubernetes version, so that a cluster upgrade does not suddenly reject pods.
Expected:
namespace/qdrant labeled
Step 4 – a tradesperson without house rules. The workshop pod from Drill 5 would now be rejected. A simple busybox pod shows it:
# on vdb1
kubectl run werkstatt -n qdrant --restart=Never --image=busybox:1.37 -- sleep 60Expected:
Error from server (Forbidden): pods "werkstatt" is forbidden: violates PodSecurity "restricted:v1.37": allowPrivilegeEscalation != false (container "werkstatt" must set securityContext.allowPrivilegeEscalation=false), unrestricted capabilities (container "werkstatt" must set securityContext.capabilities.drop=["ALL"]), runAsNonRoot != true (pod or container "werkstatt" must set securityContext.runAsNonRoot=true), seccompProfile (pod or container "werkstatt" must set securityContext.seccompProfile.type to "RuntimeDefault" or "Localhost")
The message says exactly which fields are missing. An emergency
workshop like the one in Drill 5 will need exactly these fields and
runAsUser: 1000 from now on.
Step 5 – does Qdrant start under the house rules? A deleted pod has to be created anew – and admission checks it in the process.
# on vdb1
kubectl -n qdrant delete pod qdrant-1Expected:
pod "qdrant-1" deleted from qdrant namespace
# on vdb1
kubectl -n qdrant wait --for=condition=Ready pod/qdrant-1 --timeout=3mExpected:
pod/qdrant-1 condition met
# on vdb1
kubectl -n qdrant get pod qdrant-1 -o jsonpath='{.spec.initContainers}{"\n"}{.spec.containers[0].securityContext}{"\n"}'Expected:
{"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]},"privileged":false,"readOnlyRootFilesystem":true,"runAsGroup":2000,"runAsNonRoot":true,"runAsUser":1000,"seccompProfile":{"type":"RuntimeDefault"}}
The first line is empty: no init container any more.
Remember: The house rules apply to every pod that newly enters the building – including the emergency tradesperson. First check with
--dry-run=server, then adjust the pods, then set the label.
Save your progress? Sign up for free
Diagnosis task: The read script gives up
Since midday today the read script from Day 6 reports nothing but errors. With the old address:
# on vdb1
cd ~/labor/tag06# on vdb1
~/werkbank/bin/python lesen.py http://10.43.151.237:6333 doku 2Expected:
00:41:33 FEHLER: illegal request line
/home/ubuntu/werkbank/lib/python3.12/site-packages/qdrant_client/qdrant_remote.py:295: UserWarning: Failed to obtain server version. Unable to check client-server compatibility. Set check_compatibility=False to skip version check.
show_warning(
00:41:35 Ende: 0 Antworten, 8 Fehler
A colleague has already tried https:
# on vdb1
~/werkbank/bin/python lesen.py https://10.43.151.237:6333 doku 2Expected:
00:41:38 FEHLER: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer cer
/home/ubuntu/werkbank/lib/python3.12/site-packages/qdrant_client/qdrant_remote.py:295: UserWarning: Failed to obtain server version. Unable to check client-server compatibility. Set check_compatibility=False to skip version check.
show_warning(
00:41:40 Ende: 0 Antworten, 8 Fehler
Before you read on: which three things is the script missing?
Solution path:
illegal request linemeans: plain text to a TLS port – the address needshttps://(Drill 4).CERTIFICATE_VERIFY_FAILEDmeans: the client does not know the CA – it needsca.crt(Drill 4, Step 3). Notverify=False.- And even with both, the ID card is missing: without a key, the result would be 401 (Drill 2). For a read script, the read-only key is enough.
You create the adapted version in ~/labor/tag10, where
ca.crt and lese-key are located:
# on vdb1
cd ~/labor/tag10# on vdb1
nano lesen.py"""Fragt eine Collection viermal pro Sekunde ab – über TLS und mit dem Lese-Schlüssel."""
import ssl
import sys
import time
import numpy as np
from qdrant_client import QdrantClient
QDRANT, COLLECTION, SEKUNDEN = sys.argv[1], sys.argv[2], int(sys.argv[3])
schluessel = open("lese-key").read().strip()
ca = ssl.create_default_context(cafile="ca.crt")
vektor = np.load("../tag01/vektoren.npy")[0].tolist()
client = QdrantClient(url=QDRANT, api_key=schluessel, verify=ca, timeout=2)
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')} {neu}{dauer}", flush=True)
zustand, seit = neu, time.time()
time.sleep(0.25)
print(f"{time.strftime('%T')} Ende: {ok} Antworten, {fehler} Fehler", flush=True)| Line | Meaning |
|---|---|
open("lese-key").read().strip() |
key from the file, without the line break – never in the source code |
ssl.create_default_context(cafile="ca.crt") |
a TLS context that trusts the Stadtbibliothek CA |
api_key=schluessel |
qdrant-client builds the api-key header
from it |
verify=ca |
is passed through to the HTTP client and verifies the certificate with this CA |
# on vdb1
~/werkbank/bin/python lesen.py https://10.43.151.237:6333 doku 5Expected:
/home/ubuntu/werkbank/lib/python3.12/site-packages/qdrant_client/qdrant_remote.py:295: UserWarning: Failed to obtain server version. Unable to check client-server compatibility. Set check_compatibility=False to skip version check.
show_warning(
00:41:53 antwortet
00:41:58 Ende: 19 Antworten, 0 Fehler
19 responses, 0 errors. The warning about the version check remains;
it does not stop the queries. From today on, all workbench scripts need
the same pattern – key from a file, verify with the CA,
https:// – including last-prozesse.py from Day
8.
Checkpoint
# on vdb1
kubectl -n qdrant get pods -o wideExpected:
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
qdrant-0 1/1 Running 0 106s 10.42.1.56 vdb2 <none> <none>
qdrant-1 1/1 Running 0 45s 10.42.3.32 vdb4 <none> <none>
qdrant-2 1/1 Running 0 3m17s 10.42.2.16 vdb3 <none> <none>
# on vdb1
curl -sS -o /dev/null -w '%{http_code}\n' --cacert ~/labor/tag10/ca.crt https://10.43.151.237:6333/metricsExpected:
401
The metrics now need an ID card too – important for Day 11.
With lese-key in the header you get 200.
# on vdb1
curl -sS --cacert ~/labor/tag10/ca.crt -H "api-key: $(cat ~/labor/tag10/admin-key)" https://10.43.151.237:6333/cluster | jq -c '.result|{peer_id,raft_info,message_send_failures}'Expected (your peer_ids will
differ):
{"peer_id":121400021250061,"raft_info":{"term":332,"commit":207,"pending_operations":0,"leader":1485700002748332,"role":"Follower","is_voter":true},"message_send_failures":{}}
The council is in session with leader qdrant-2
(1485700002748332), no send errors.
# on vdb1
kubectl -n qdrant get networkpolicyExpected:
NAME POD-SELECTOR AGE
alles-zu <none> 5m52s
leser-und-werkbank app.kubernetes.io/name=qdrant 5m12s
rat-untereinander app.kubernetes.io/name=qdrant 5m12s
# on vdb1
kubectl get ns qdrant --show-labelsExpected:
NAME STATUS AGE LABELS
qdrant Active 31h kubernetes.io/metadata.name=qdrant,name=qdrant,pod-security.kubernetes.io/enforce-version=v1.37,pod-security.kubernetes.io/enforce=restricted
# on vdb1
kubectl -n longhorn-system get volumes.longhorn.io -o custom-columns=NAME:.metadata.name,STATE:.status.state,ROBUST:.status.robustnessExpected: all volumes attached and
healthy.
# on vdb1
curl -sS --cacert ~/labor/tag10/ca.crt -H "api-key: $(cat ~/labor/tag10/lese-key)" https://10.43.151.237:6333/collectionsExpected:
{"result":{"collections":[{"name":"doku"},{"name":"glove"},{"name":"verteilt"}]},"status":"ok","time":0.00005409}
From now on, every call needs: https://,
--cacert ~/labor/tag10/ca.crt and a key –
lese-key for reading, admin-key for
managing.
Test yourself
- One call returns 401, another 403. What is wrong in each case?
- You turn on the API key in a running Qdrant cluster, and
kubectl rollout statushangs. Why, and what do you do? - A search application should only read the collection
doku. Read-only key or JWT – and why? - A colleague suggests setting
verify=Falsein all scripts, “it’s only internal anyway”. What do you reply? - After turning on
cluster.p2p.enable_tls, all pods are in CrashLoopBackOff. Where do you look first, and what is the cause? - A new batch job with the label
qdrant-zugriff=jafails on every start with “Could not connect”, and on a retry it works. Is the NetworkPolicy wrong?
Answers:
- 401: an ID card is missing – no
api-keyheader and no bearer token. 403: the ID card is valid, but it does not allow this – read-only key when writing, JWT for a different collection, expired or wrongly signed token. - Qdrant also demands the key on the Raft connection. The new pod rejects the messages of the old ones, never becomes ready, and the rollout waits forever. Delete the remaining pods at the same time so that all start with the key – with a short interruption, so do it in a maintenance window.
- JWT. The read-only key allows reading all collections. A JWT names
only
doku, expires, and the list of collections shows the application onlydoku. - Without verification, anyone who hooks into the connection can
present their own certificate and grab the key. The CA is one file –
verifywith the CA costs one line. - In the log of the previous run (
--previous):Failed to recover from peer … at http://…. The peers stored their addresses withhttp://in the Raft state. Either roll back, or stop Qdrant and changepeer_address_by_idinraft_state.jsontohttps://on all volumes. - No, the policy is correct. The policy controller enters a new pod’s IP only shortly after startup. The job needs retries with a wait time when establishing the connection.
Interview note
“How do you secure a self-hosted vector database on
Kubernetes?” – In layers. First, authentication: admin and
read-only keys from a Secret, and for applications JWTs with exactly the
collections they need and an expiry time. Second, TLS with cert-manager
and our own CA, for clients and between the peers – I set p2p TLS from
the start on new clusters, because Qdrant stores the peer addresses
including the scheme. Third, NetworkPolicies with default deny: peers
among themselves, clients only on the client ports, the p2p port only
for peers. Fourth, Pod Security restricted on the
namespace. Plus RBAC: whoever may read Secrets in the namespace has the
admin key, including via the Helm release Secret. And I know from the
lab that keys and p2p TLS cannot be turned on pod by pod in a running
cluster.
Enterprise note
In production, keys come from a secret manager (Vault, OpenBao,
External Secrets) and are rotated regularly. Changing the admin key is a
maintenance window: all peers have to get it at the same time (Drill 2),
and all issued JWTs become invalid (Drill 3). That is why teams give
applications short-lived JWTs and renew them automatically instead of
distributing keys. Your own CA belongs in a central PKI system; clients
only get ca.crt. Because Qdrant does not reload the
certificate for gRPC and p2p by itself (TTL not supported),
renewal by cert-manager needs a restart of the pods – a tool like
Reloader or a scheduled rollout before renewBefore takes
care of that. Instead of an ipBlock for the workbench,
tools run in labeled pods so that the approval does not depend on a node
address. And egress needs rules too: Qdrant only has to reach DNS and
the peers on the outside.
Summary
- Without protection, a pod from the
defaultnamespace created the collectioneinbruch– deleting would have worked just as well. - Admin and read-only keys with
openssl rand -hex -out … 32, in the Secretqdrant-schluessel. Without a key: 401; read-only key when creating or deleting: 403 “Global manage access is required”. - The rollout with a key hung: Qdrant also protects Raft on port 6335
with the key, and the new pod rejected the old ones (“does not have
valid authentication credentials”,
/readyz503). Deleted the other two pods at the same time – all ready after 68 seconds. - The key lives in the namespace three times: in your own Secret, in
qdrant-apikeyand in the Helm release. - JWT with
jwt_rbac: onlydoku, only reading;gloveand writing 403, list filtered. Expired, still accepted one second later,ExpiredSignaturea good minute later. Signed with the read-only key:InvalidSignature. - cert-manager v1.21.3, own CA, server certificate for 90 days. TLS on
REST and gRPC rolled through pod by pod. Without the CA:
curl: (60). - p2p TLS sent all three pods into CrashLoop because
raft_state.jsonstores the peer addresses withhttp://. Repaired with a workshop pod andkubectl cp, afterwardshttps://in the address book, all 1,183,514 points ofglovethere. - NetworkPolicies: the k3s controller rejects actively (7 to 22 ms, no
timeout). The workbench comes with the Flannel address
10.42.0.0. New pods are approved only after a moment. - PSS
restricted: four violations, fixed withcapabilities.drop,seccompProfileand without a root init container; a busybox pod is rejected.
Commands at a glance
| Command | Purpose |
|---|---|
kubectl run <name> -n default --rm -i --restart=Never --image=curlimages/curl:8.11.1 -- curl … |
check access from a foreign pod |
openssl rand -hex -out <file> 32 |
generate a 256-bit key |
kubectl -n qdrant create secret generic <name> --from-file=<key>=<file> |
Secret from files |
curl -H "api-key: $(cat <file>)" … |
call with a key, without displaying it |
curl -H "Authorization: Bearer $(cat <token>)" … |
call with a JWT |
python3 jwt-erzeugen.py <key> <collection> r\|rw <minutes> > <token> |
issue a JWT |
cut -d. -f2 <token> \| base64 -d |
read the payload of a JWT |
helm install cert-manager oci://quay.io/jetstack/charts/cert-manager --version v1.21.3 -n cert-manager --create-namespace --set crds.enabled=true |
install cert-manager |
kubectl -n qdrant wait --for=condition=Ready certificate/<name> |
wait until a certificate is issued |
openssl x509 -in <crt> -noout -subject -issuer -enddate -ext subjectAltName |
inspect a certificate |
curl --cacert ca.crt https://… |
TLS with your own CA |
kubectl -n qdrant logs <pod> -c qdrant \| grep TLS |
which ports run with TLS |
kubectl -n qdrant logs <pod> -c qdrant --previous |
log of the crashed run |
kubectl -n qdrant scale statefulset qdrant --replicas=0 |
stop Qdrant completely |
kubectl cp qdrant/<pod>:<path> <file>
/
kubectl cp <file> qdrant/<pod>:<path> |
copy a file out of or into the pod |
ip route get <pod-ip> |
a node’s source address towards a pod |
kubectl -n qdrant get networkpolicy |
show NetworkPolicies |
kubectl label --dry-run=server --overwrite ns <ns> pod-security.kubernetes.io/enforce=restricted |
check PSS violations in advance |
kubectl label --overwrite ns <ns> pod-security.kubernetes.io/enforce=restricted pod-security.kubernetes.io/enforce-version=v1.37 |
enforce PSS |