我正在尝试连接到群集,但收到以下错误:
gcloud container clusters get-credentials cluster1 --region europe-west2 --project my-project
Fetching cluster endpoint and auth data.
CRITICAL: ACTION REQUIRED: gke-gcloud-auth-plugin, which is needed for continued use of kubectl, was not found or is not executable.
Install gke-gcloud-auth-plugin for use with kubectl by following https://cloud.google.com/blog/products/containers-kubernetes/kubectl-auth-changes-in-gke
kubeconfig entry generated for dbcell-cluster.
我已经安装了谷歌云SDK 400,kubektl 1.22.12,gke-gcloud-auth-plugin 0.3.0,还安装了带有export USE_GKE_GCLOUD_AUTH_PLUGIN=True
gke-gcloud-auth-plugin --version
Kubernetes v1.24.0-alpha+f42d1572e39979f6f7de03bd163f8ec04bc7950d
但当我尝试连接到集群时,总是出现相同的错误,您对此有什么想法吗?
谢谢
在该区域内存在聚类,并验证了env变量
与
echo $USE_GKE_GCLOUD_AUTH_PLUGIN
True
我安装了gke-gcloud-auth-plugin using gcloud co
组件安装...我不知道我还能检查什么
gcloud components list
1条答案
按热度按时间dffbzjpn1#
我通过删除GCP的当前
kubeconfig
上下文解决了同样的问题。1.运行上下文名称:
kubectl配置获取上下文
1.删除上下文:
kubectl配置删除上下文CONTEXT_NAME
1.重新配置凭据
gcloud容器集群获取凭据CLUSTER_NAME --区域REGION --项目PROJECT
警告信息现在应该消失了。