Running Ubuntu.
Installed Google Cloud SDK via:
$ sudo curl https://sdk.cloud.google.com | sudo bash
$ exec -l $SHELL
Running "gcloud" works just fine.
Running "sudo gcloud" results in the following error:
sudo: gcloud: command not found
Oddly, when I installed Google Cloud SDK via apt-get, "sudo gcloud" works just fine. Unfortunately I cannot use Google Cloud SDK from apt-get as kubectl does not come with it and cannot be installed with the apt-get version.
Why would "gcloud" work and not "sudo gcloud"?
EDIT 5/21/2017: The following works if I manually set the path with the sudo command. I'd rather not do this every time though.
sudo env "PATH=$PATH" gcloud