kn doesn't support when the env variable KUBECONFIG has multiple files
As reference: https://kubernetes.io/docs/tasks/access-application-cluster/configure-access-multiple-clusters/#append-home-kube-config-to-your-kubeconfig-environment-variable
For example in my setup I use IKS and have multiple cluster I deal with, so I load KUBECONFIG variable with multiple KUBECONFIG paths including the default one.
value:
/Users/csantanapr/.kube/config:/Users/csantanapr/.bluemix/plugins/container-service/clusters/cluster1/kube-config-wdc04-cluster1.yml:/Users/csantanapr/.bluemix/plugins/container-service/clusters/cluster2/kube-config-dal13-cluster2.yml
This allows to use things like kubetcx
$ kubectx
cluster1
cluster2
docker-desktop
The CLI kubectl works fine current context is cluster1
kubectl get ns | grep knative
knative-build Active 98m
knative-eventing Active 98m
knative-monitoring Active 98m
knative-serving Active 98m
knative-sources Active 98m
The problem is kn doesn't work and recognize the current context from the merged files like kubectl
kn service list
stat /Users/csantanapr/.kube/config:/Users/csantanapr/.bluemix/plugins/container-service/clusters/cluster1/kube-config-wdc04-cluster1.yml:/Users/csantanapr/.bluemix/plugins/container-service/clusters/cluster2/kube-config-dal13-cluster2.yml: no such file or directory
kn doesn't support when the env variable
KUBECONFIGhas multiple filesAs reference: https://kubernetes.io/docs/tasks/access-application-cluster/configure-access-multiple-clusters/#append-home-kube-config-to-your-kubeconfig-environment-variable
For example in my setup I use IKS and have multiple cluster I deal with, so I load
KUBECONFIGvariable with multiple KUBECONFIG paths including the default one.value:
This allows to use things like
kubetcxThe CLI
kubectlworks fine current context iscluster1The problem is
kndoesn't work and recognize the current context from the merged files likekubectl