Command

Kubernetes List Config Contexts Command

The Kubernetes command to list config contexts is kubectl config get-contexts.

Quick Answer

Command
kubectl config get-contexts
KubernetesCommand

List Config Contexts

Type this command
kubectl config get-contexts

Lists every context configured in your kubeconfig.

Learn More

How to list config contexts in Kubernetes

  1. Open the terminal or command interface for Kubernetes.
  2. Type kubectl config get-contexts, replace any placeholders, and run it.

Kubernetes List Config Contexts Command

Run kubectl config get-contexts.

Related Commands

Frequently asked questions

What is the Kubernetes command to list config contexts?

Run kubectl config get-contexts.

Where do I type this Kubernetes command?

Type it in the terminal or command-line interface used by Kubernetes.

Does this Kubernetes command work on Mac and Windows?

Yes. The command text is the same on both platforms when the tool is installed.

Official source · How we verify