Open kastl-ars opened 2 months ago
hi @kastl-ars 👋 there is --context
flag you can use to specify the kubectl context name returned from kubectl config get-contexts
.
hi @kastl-ars 👋 there is
--context
flag you can use to specify the kubectl context name returned fromkubectl config get-contexts
.
Thanks for the reply, Michi. But that only works if I have a kubeconfig in ~/.kube/config
or the KUBECONFIG variable set.
Which is exactly what I would like to avoid by having a --kubeconfig
flag...
ah yeah that makes sense, sorry i didn't read you original description carefully 👍
ah yeah that makes sense, sorry i didn't read you original description carefully 👍
No problem, always better to ask questions than to misunderstand something. :-)
If necessary, I have submitted a PR: Add a --kubeconfig argument
Proposal
Many other tools including
kubectl
support specifying a kubeconfig file to be used when connecting to the cluster with a--kubeconfig`` flag or argument. So they work without having a
~/.kube/configfile present (or
KUBECONFIG` variable set to a file path).If I am not mistaken, the cilium CLI does not support such an argument? Only a context can be given, from what I found.
As I am working with many different clusters, it would be nice if the cilium CLI supported such a flag. This makes switching between clusters a lot easier. Maybe others find that useful, too.
Kind Regards, Johannes