Kubectl: Switch Contexts
Then he opened his .bashrc and added three lines:
kubectl config get-contexts The output made his stomach drop:
He’d been debugging the wrong cluster for the last ten minutes. kubectl switch contexts
Now he ran the same commands.
Alex rubbed his eyes and stared at the terminal. The on-call alert was screaming: Then he opened his
kubectl config use-context prod-us-east Switched to context "prod-us-east".
Here’s a complete story focused on using kubectl to switch contexts, told from the perspective of a platform engineer named Alex. The Wrong Context kubectl switch contexts
Then it hit him.