With curl and the same key, fetching the metrics works. Prometheus reports down for every pod, and the error does not come from the server – the request never leaves Prometheus.
Symptom
jq -r '.data.activeTargets[] | select(.labels.namespace=="qdrant") | [.labels.job, .labels.pod, .health, .lastError] | @tsv' ziele.json qdrant-headless qdrant-0 down Get "https://10.42.1.56:6333/metrics": net/http: invalid header field value for "Authorization" qdrant-headless qdrant-2 down Get "https://10.42.2.16:6333/metrics": net/http: invalid header field value for "Authorization" qdrant-headless qdrant-1 down Get "https://10.42.3.32:6333/metrics": net/http: invalid header field value for "Authorization"
A ServiceMonitor reads Qdrant's read-only key from a secret and sends it as the Authorization header.
Diagnosis
64 hex characters and a newline – openssl rand -hex -out writes a \n at the end.
wc -c ../tag10/lese-key 65 ../tag10/lese-key
Causes
secretNewline at the end of the key
kubectl create secret --from-file copies the file byte for byte. curl with $(cat …) does not notice, because the shell strips the final newline. Prometheus takes the value literally, and a newline is not allowed in an HTTP header.
Fix
Don't: Look for the error on the server. Prometheus never sends the request – Qdrant's log shows nothing.
Vector database engineering on Kubernetes, day 11: observability – the lending statistics.
Go to day 11 →
FAQ
Why does Qdrant accept the same key?
Qdrant reads the value from the same secret and apparently strips the newline when loading it. Prometheus does not.
Where else does the same mistake show up?
In the course also with S3 – there it is called SignatureDoesNotMatch. Always check key files with wc -c.