Kubectl: command not found on Travis

You should use before_install instead of before-install, please check your syntax before posting issues, as this is the wrong syntax within Travis, and the .travis.yml as a whole. I recommend you reading this.

---
env:
  global:
    - CLOUDSDK_CORE_DISABLE_PROMPTS=1
before_install:
 - curl https://sdk.cloud.google.com | bash > /dev/null
 - source $HOME/google-cloud-sdk/path.bash.inc
 - gcloud components install kubectl

Then of course, it’s speaking with Travis now - and works perfectly, via it’s now before_install and not before-install. So it’s no wonder Kubernetes is not getting called.

The output:

kubectl version
Client Version: version.Info{Major:"1", Minor:"11", GitVersion:"v1.11.7", GitCom
1 Like