I had the same error and here's how I fixed it.
brew info google-cloud-sdk
which produces:
To add gcloud components to your PATH, add this to your profile:
for bash users
source "$(brew --prefix)/share/google-cloud-sdk/path.bash.inc"
for zsh users
source "$(brew --prefix)/share/google-cloud-sdk/path.zsh.inc"
source "$(brew --prefix)/share/google-cloud-sdk/completion.zsh.inc"
for fish users
source "$(brew --prefix)/share/google-cloud-sdk/path.fish.inc"
Grab the code for your terminal and then run it (e.g., for zsh)
source "$(brew --prefix)/share/google-cloud-sdk/path.zsh.inc"
Add the above line to your .zshrc
profile to make sure that it is loaded every time you open a new terminal.
I had originally installed gcloud sdk with homebrew brew install google-cloud-sdk
. At that time, I read the Caveats, which tell you how to add gcloud components to your PATH.
I installed both kubectl
and gke-gcloud-auth-plugin
, and neither of them could be found from the command line. I got the same error as the OP "command not found"