- Get Current Context
kubectl config current-context
- List all the context
kubectl config get-contexts
- Set context (Switching between different Kubernetes clusters)
kubectl config set-contexts <context-name>
Scripting is sorcery
kubectl config current-context
kubectl config get-contexts
kubectl config set-contexts <context-name>