get_k8s_context() { echo "$(kubectl config current-context 2>/dev/null)" } PROMPT='$(get_k8s_context) $ '

Finally, he ran kubectl config get-contexts . He was in cluster-2 (staging) but his mind was in cluster-1 (production). The pod was running perfectly. He was just looking at the wrong wall.

Add this to your ~/.zshrc or ~/.bashrc :