Ok, I installed kubectl in the following way on my Mac:
- installed gcloud using homebrew
- installed kubectl using gcloud components install.
I want to run a shell script that calls kubectl directly. However, I get an error.
$ kubectl version
-bash: kubectl: command not found
I expected gcloud components install to set path variables so that I can call kubectl. Looks like that has not happened. I searched for kubectl in my mac but was not able to find it.
How can I get kubectl to work from command line?
gcloud components install kubectl
as the documentation states (the last parameter is missing in your question)? Alternatively it may work installing the kubernetes cli yourself: kubernetes.io/docs/tasks/tools/install-kubectl/… ? – Cypripedium