kubectl config use-context staging-cluster kubectl get pods Now you see crashing pods. You check logs. You find the bug. Alex thanks you. You finish your coffee — still warm enough.
You nod, stay in the same terminal, and run: kubectl context
From that day on, your first command every morning is: stay in the same terminal
kubectl config use-context staging-cluster — put your current context right in your terminal prompt: and run: From that day on
Then your team lead, Alex, pings you: “Hey, the staging environment is throwing 500 errors. Can you check?”
export PS1="[\u@\h \$(kubectl config current-context)] \$ " Now you’ll see something like [alex@laptop dev-cluster] $ — no more guessing.