Kubectl Switch Contexts __exclusive__ May 2026

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 .

Then he opened his .bashrc and added three lines: kubectl switch contexts

kubectl config use-context prod-us-east Switched to context "prod-us-east". using port-forward: Twenty minutes later

He tried hitting the service endpoint manually, using port-forward: Alex had rolled back the deployment

Twenty minutes later, Alex had rolled back the deployment, adjusted the Redis maxclients setting, and re-deployed the fix. Latency returned to normal. The alert cleared.

kubectl get pods -n payment-system The list appeared. Pods were running. That was odd. He checked the logs of the oldest one: