2017-01-06 89 views
6

我正在使用gcloud上的Google容器引擎。因此,在成功完成gloud init我也跟着指示,做:找不到默认凭据

gcloud container clusters get-credentials cluster-1 --zone europe-west1-c --project whatever 

然后:

kubectl proxy 

,但我得到了以下错误消息:

error: google: could not find default credentials. See https://developers.google.com/accounts/docs/application-default-credentials for more information. 

我看到的东西,在~/.kube/config文件所以我不确定出了什么问题。我也在机器上安装了minikube,但我认为这不是问题。

回答

22

使用

gcloud auth application-default login 

登录应用程序默认creadentials。对于应用程序的默认凭据行为在gcloudchanged因为版本128

注意,通过gcloud auth logingcloud initgcloud config set account MY_ACCOUNT改变凭证将不会影响应用程序的默认凭据,他们从gcloud凭证单独管理。

+1

这节省了我的谢意! –

+1

来自首尔的爱。非常感谢! – minimanimo