You rotated a database password in a Kubernetes Secret, but pods keep using the old one and auth errors start once the old password is revoked.
IntermediateTroubleshootingKubernetes cluster-level
Answer
Likely causes → Secrets used as environment variables are read only when the container starts. Mounted Secret volumes do update (after a kubelet sync delay), but not when mounted with subPath, and many apps read the file once at startup anyway.
Diagnose →
kubectl get deploy api -o jsonpath='{.spec.template.spec.containers[0].env}' | jq '.[] | select(.valueFrom.secretKeyRef)'
kubectl exec deploy/api -- printenv DB_PASSWORD | sha256sum
kubectl get secret db -o jsonpath='{.data.password}' | base64 -d | sha256sum
Fix → Roll the pods so they pick up the new value: kubectl rollout restart deploy/api.
Prevent → Rotate in two phases (add new credential, roll pods, then revoke old). Automate restarts on Secret change with a checksum annotation in the Helm template or a controller like Stakater Reloader, or have the app reload credentials from a mounted file or Secrets Manager.
More on Kubernetes cluster-level
Every `kubectl` command fails with "The connection to the server 10.0.1.10:6443 was refused - did you specify the right host or port?"BeginnerA new deployment's pods stay Pending with "0/5 nodes are available: 5 Insufficient cpu. preemption: 0/5 nodes are available: 5 No preemption victims found for incoming pod."BeginnerPods are Pending, but Cluster Autoscaler won't add nodes; the pod events say "pod didn't trigger scale-up: 2 node(s) didn't match Pod's node affinity/selector, 1 max node group size reached".IntermediateA node goes NotReady and kubelet logs "PLEG is not healthy: pleg was last seen active 3m10s ago; threshold is 3m0s".IntermediateAfter a node was terminated, its pods have shown `Terminating` for two hours and their replacements aren't being created.IntermediateYou deleted a namespace an hour ago and it's still `Terminating`.Intermediate