You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using several kubeconfigs referenced by the KUBECONFIG env var (colon separated paths), this plugin doesn't work. Not even when referencing the specific config file.
$ echo$KUBECONFIG
/home/me/.kube/config:/home/me/.kube/config2:/home/me/.kube/config3
$ kubectl get pods
NAME READY STATUS RESTARTS AGE
mypod 1/1 Running 0 5d3h
$ kubectl sniff mypod
Error: invalid configuration: [context was not found for specified context: mycluster, cluster has no server defined]
$ kubectl sniff -x /home/me/.kube/config2 mypod
Error: context doesn't exist
Workaround
I managed to make it work by doing the following steps
Unset the KUBECONFIG var
Remove the main config file (~/.kube/config)
Copy the contents of the desired config file to the main one (~/.kube/config)
The text was updated successfully, but these errors were encountered:
As far as I understand the -x flag is intended to specify a context name, not a kubeconfig file (which is what I tried). Just mention I've also tried to specify the context name using that flag and the result is the same.
The problem looks to come from the fact I'm using several kubeconfigs at the same time, which should not be an issue.
Still the issue in 1.6.2 if KUBECONFIG var contains more 1 cluster
❯ ~ k sniff -n kazoo5-frankfurt ecallmgr-56d8bc767d-ngzpk -c apps --image nicolaka/netshoot -p -f "tcp port 5984"
Error: invalid configuration: [context was not found for specified context: kubernetes-admin-k8s-frankfurt@k8s-frankfurt, cluster has no server defined]
Problem
When using several kubeconfigs referenced by the
KUBECONFIG
env var (colon separated paths), this plugin doesn't work. Not even when referencing the specific config file.Workaround
I managed to make it work by doing the following steps
The text was updated successfully, but these errors were encountered: