Command

Kubernetes Show Current Context Command

The Kubernetes command to show current context is kubectl config current-context.

Quick Answer

Command
kubectl config current-context
KubernetesCommand

Show Current Context

Type this command
kubectl config current-context

Prints the name of the context you are working in.

Learn More

How to show current context in Kubernetes

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

Kubernetes Show Current Context Command

Run kubectl config current-context.

Related Commands

Frequently asked questions

What is the Kubernetes command to show current context?

Run kubectl config current-context.

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