Skip to content
masterclass Buddy

Kubernetes · Command

kubectl config use-context

Sets the current context in a kubeconfig file. Later kubectl commands use the selected context's cluster, user, and namespace settings.

Last updated

Syntax

kubectl config use-context CONTEXT_NAME

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • kubectl config view
  • KUBECONFIG
  • --kubeconfig
  • context
  • kubeconfig file

Source: kubectl config use-context. Checked 2026-11-03.