# 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:
He’d been debugging the wrong cluster for the last ten minutes. kubectl switch contexts
But Alex never forgot that feeling. The cold realization that you’re looking at a mirror image of the problem, not the problem itself. # Show k8s context in prompt export PS1='\[\e[33m\](k8s:
He tried hitting the service endpoint manually, using port-forward: using port-forward: He switched contexts immediately:
He switched contexts immediately: