Change the active context in kubeconfig.
Section: Setup, Contexts, and Cluster Info
Switch context
bash
bash
kubectl config use-context prod-clusterExplanation
Change the active context in kubeconfig.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Setup, Contexts, and Cluster Info
Set default namespace for context
Persist a default namespace for the current context.
Show client and server version
Print the kubectl client and Kubernetes API server versions.