0 0 0

ubuntu通过gcloud 访问谷歌云 k8s集群报错集合

惰卫
27天前 286

1.执行gcloud命令

 gcloud container clusters get-credentials gke-tiq-xx-xx-u-xx-01 --region me-xxx--project prj-tiq-xx-xx-u-xx-01

 报错

Fetching cluster endpoint and auth data.

ERROR: gcloud crashed (TypeError): string indices must be integers, not 'str'

If you would like to report this issue, please run the following command:

gcloud feedback“

 

原因:

linux用户权限不够,需要用sudo权限

2.执行google云命令

gcloud auth login

报错:

ERROR: (gcloud.container.clusters.get-credentials) You do not currently have an active account selected.

Please run:xxz

 

解决方法:

执行命令:sudo gcloud auth login --no-launch-browser

 

 3.执行google云命令

 

gcloud container clusters get-credentials gke-tiq-xx-xx-u-xx-01 --region me-xxx--project prj-tiq-xx-xx-u-xx-01

报错:

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/kubernetes-engine/docs/how-to/cluster-access-for-kubectl#install_plugin

解决方法:

安装google-cloud-sdk-gke-gcloud-auth-plugin

sudo apt-get install google-cloud-sdk-gke-gcloud-auth-plugin

最新回复 (0)

    暂无评论

请先登录后发表评论!

返回
请先登录后发表评论!