Kubectl Context -

kubectl config get-contexts

alias kubectl to a wrapper that prints the context before every command (great for production access). kubectl context

kubectl config set-context gce --user=cluster-admin --namespace=foo \ && kubectl config use-context gce kubectl config unset users... Kubernetes Show all Action Command List all contexts kubectl config get-contexts Show current context kubectl config current-context Switch to a context kubectl config use-context Create/Modify a context kubectl config set-context --cluster= --user= --namespace= Delete a context kubectl config delete-context Pro-Tips for Power Users Quick Namespace Swaps kubectl config get-contexts alias kubectl to a wrapper