Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Issue Fix: gke-gcloud-auth-plugin command not found

Note: I tried finding the correct place to post this fix, but unfortunately couldn't find it, therefore here with Tips and Tricks and General Discussion labels. If someone knows please let me know, if this is not the correct place.

Issue
Facing command not found error for the new GKE auth plugin in MAC even after gke-gcloud-auth-plugin was installed via the gcloud command.
Could see other commands like kubectl, gcs, bq etc working but upon running gke-gcloud-auth-plugin --version it throws an error of

zsh: command not found: gke-gcloud-auth-plugin

Note: I found this solution on StackOverflow and it worked flawlessly, hence sharing it here.

Solution

1. Run: 

brew info google-cloud-sdk

Under the caveats section, it would give PATH values command of bash, zsh and fish.

2. Run both commands for zsh in the output.

If it throws an error of file not found replace the path with

/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/path.zsh.inc

and

/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/completion.zsh.inc

(after the --prefix) and run.

This would have fixed this error. Run

gke-gcloud-auth-plugin or gke-gcloud-auth-plugin --version 

to verify.

3 0 15.4K
0 REPLIES 0
Top Labels in this Space
Top Solution Authors