Is there a way to ask
kubectl to use a specific context via environment variable, rather than through
That is, instead of:
kubectl --context foo ...
I’d like to be able to do:
KUBECTL_CONTEXT=foo kubectl ...
(Or whatever – the name of the environment variable isn’t important.)
Similar to both Helm (
HELM_KUBECONTEXT) and other tools, e.g.,
Apologies if I missed an existing feature, but it looks like there are only 4 documented environment variables ?
KUBECONFIG which can be used for something similar (by copying content from the shared config file and specifying the current context). But that involves creating a separate config file, when all I need in the current case is to use a specific context out of the existing shared