kubectlBasics

kubectl config

Views or modifies kubeconfig — including switching between clusters and namespaces via contexts.

Syntax

kubectl config get-contexts | use-context <name>

Examples

Switch the active context

kubectl config use-context staging-cluster

Related commands