Kubectl Switch Contexts ((better)) -

kubectl logs payment-api-f9k3l-8hj2s -n payment-system --previous There it was. A connection pool exhaustion error to the Redis cache. The new deployment had increased the default pool size, and the production Redis max connections was too low.

He switched contexts immediately:

# Show k8s context in prompt export PS1='\[\e[33m\](k8s: $(kubectl config current-context 2>/dev/null))\[\e[0m\] \w \$ ' He also created an alias he’d never forget: kubectl switch contexts

kubectl port-forward service/payment-api 8080:80 -n payment-system Fast. Responsive. 20ms responses. Something was wrong—not with the code, but with his assumptions . but with his assumptions .