List configured contexts and their clusters/users.
Section: Setup, Contexts, and Cluster Info
List contexts
bash
bash
kubectl config get-contextsExplanation
List configured contexts and their clusters/users.
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.