英文:
Why kubectx failed? multiple files in KUBECONFIG are currently not supported
问题
我添加了 KUBECONFIG
echo $KUBECONFIG
/home/miki/.kube/config:
当我尝试
kubectx
我收到了
error: kubeconfig error: failed to load: cannot determine kubeconfig path: multiple files in KUBECONFIG are currently not supported
在我的配置文件中,我有 k3s 和 aws 集群。
server: https://127.0.0.1:6443
name: default
server: https://3ECADDEA56D1B423B5D649212BDC10A1.yl4.us-east-1.eks.amazonaws.com
name: arn:aws:eks:us-east-1:57711112222:cluster/pizd-cluster
如何使用 kubectx 避免错误?
英文:
I added KUBECONFIG
echo $KUBECONFIG
/home/miki/.kube/config:
When I try
kubectx
I got
error: kubeconfig error: failed to load: cannot determine kubeconfig path: multiple files in KUBECONFIG are currently not supported
In my config file I have both k3s and aws clusters.
server: https://127.0.0.1:6443
name: default
server: https://3ECADDEA56D1B423B5D649212BDC10A1.yl4.us-east-1.eks.amazonaws.com
name: arn:aws:eks:us-east-1:57711112222:cluster/pizd-cluster
How to use kubectx to avoid error?
答案1
得分: 1
我已经使用单独的文件配置了这个,每个集群都有一个单独的文件,所以我用所有文件分隔开的方式设置了KUBECONFIG变量,用两个冒号":"分隔。
> echo $KUBECONFIG
'/home/user/cluster1.config:/home/user/cluster2.config:/home/user/cluster3.config'
每个文件都有自己的配置,对我来说都可以正常工作。
英文:
i've configured this using a individual file for each individual cluster, so i set the KUBECONFIG var with all files separated by two points ":"
> echo $KUBECONFIG
'/home/user/cluster1.config:/home/user/cluster2.config:/home/user/cluster3.config'
each file with your own configuration, its works finelly to me.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论