Sometimes, you might receive separate configuration files for different projects. Instead of manually merging them into one giant file, you can set the KUBECONFIG environment variable to include multiple paths. For example: export KUBECONFIG=
To see which contexts are available to you, you can run kubectl config get-contexts. This provides a list of all defined environments, with an asterisk marking the one you are currently using. If you only need to know the name of your active context, kubectl config current-context is the quickest way to find out. Best Practices for Safe Context Switching
# Switch to dev environment kubectl config use-context dev-cluster
kubectl config current-context