Skip to content

Commit 48b875e

Browse files
committed
docs(gke/boot): Update command to auth to kubernetes host
When I ran `$ kubectl cluster-info`, I got this error: `error: google: could not find default credentials. See https://developers.google.com/accounts/docs/application-default-credentials for more information.` Looks like the auth mechanism was updated a few months ago: kubernetes/kubernetes#30617 """ Previously, gcloud would have configured kubectl to use the cluster's static client certificate to authenticate. Now, gcloud is configuring kubectl to use the service account's credentials. Kubectl is just using the Application Default Credentials library, and it looks like this is part of the ADC flow for using a JSON-key service account. """ At the bottom of that thread, this command was suggested, which worked for me: `$ gcloud auth application-default login`.
1 parent 908f516 commit 48b875e

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

src/quickstart/provider/gke/boot.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,16 @@ If you haven't configured your default zone, make sure it matches the ZONE for y
7272
$ gcloud config set compute/zone us-central1-b
7373
```
7474

75-
Now you may fetch Kubernetes credentials:
75+
Now you may fetch credentials to connect to Kubernetes:
7676
```
77-
$ gcloud container clusters get-credentials cluster-1
78-
Fetching cluster endpoint and auth data.
79-
kubeconfig entry generated for cluster-1.
77+
$ gcloud auth application-default login
78+
Your browser has been opened to visit:
79+
https://accounts.google.com/o/oauth2/auth?redirect_uri=....
80+
81+
Credentials saved to file: [~/.config/gcloud/application_default_credentials.json]
82+
83+
These credentials will be used by any library that requests
84+
Application Default Credentials.
8085
```
8186

8287
If you don't have `kubectl` CLI setup just yet, run this to get it available

0 commit comments

Comments
 (0)