Home › Kubernetes Tutorial › kubectl and contexts
kubectl and contexts
Tell kubectl which cluster to use.
kubectl reads a kubeconfig file (usually ~/.kube/config) that lists clusters, users and contexts. A context is a cluster plus a user plus a default namespace. The star marks the context in use. Switch with kubectl config use-context NAME.
Example code
kubectl config get-contexts