title: Kubectl: command not found on travis ci
body: <p>I am trying to deploy a kubernetes cluster using Travis CI and I get the following error</p>
  <p>EDIT:</p>
  <blockquote>
  <p>invalid argument &quot;myAcc/imgName:&quot; for t: invalid reference format</p>
  <p>See docker build --help</p>
  <p>./deploy.sh: line 1: kubectl: command not found</p>
  </blockquote>
  <p>This is my travis config file</p>
  <p><code>travis.yml</code></p>
  <pre><code>sudo: required
  services: 
    - docker
  env:
    global:
      - SHA-$(git rev-parse HEAD)
      - CLOUDSDK_CORE_DISABLE_PROMPTS=1
  before-install:
    - openssl aes-256-cbc -K $encrypted_0c35eebf403c_key -iv $encrypted_0c35eebf403c_iv -in service-account.json.enc -out service-account.json -d
    - curl https://sdk.cloud.google.com | bash &gt; /dev/null
    - source $HOME/google-cloud-sdk/path.bash.inc
    - gcloud components update kubectl
    - gcloud auth activate-service-account --key-file service-account.json
    - gcloud config set project robust-chess-234104
    - gcloud config set compute/zone asia-south1-a
    - gcloud container clusters get-credentials standard-cluster-1
    - echo &quot;$DOCKER_PASSWORD&quot; | docker login -u &quot;$DOCKER_USERNAME&quot; --password-stdin
  
  deploy:
    provider: script
    script: bash ./deploy.sh
    on: 
      branch: master
  </code></pre>
  <p>This is my deploy script</p>
  <p><code>deploy.sh</code></p>
  <pre><code>doccker build -t myAcc/imgName:$SHA
  docker push myAcc/imgName:$SHA
  kubectl apply -k8s
  </code></pre>
  <p>I guess the <code>gcloud components update kubectl</code> command is not working. Any ideas?</p>
  <p>Thanks !</p>