Kubectl Get Context Online

He stared at the screen. One wrong kubectl apply and he could charge a cactus to someone’s credit card.

kubectl get context But it didn’t work. The terminal spat back: error: unknown command "get context" - did you mean "config get-contexts"? Right. He’d misremembered. He corrected it: kubectl get context

alias k-get-ctx='kubectl config get-contexts' Then, just before hitting kubectl apply -f payment-fix.yaml , he ran it again. The asterisk still shone beside prod-dallas . Good. No last-minute surprises. He stared at the screen

kubectl config use-context prod-dallas But instead of applying immediately, he paused. He wrote a tiny bash alias: he switched to the staging environment:

Carefully, he switched to the staging environment: