<p>I want to use gitlab-ci (or any other CI, whatever works) to deploy to google container engine using <code>kubectl run</code></p>

<p>I have a working gitlab runner on google compute engine but can't figure out how to install <code>gcloud</code> and <code>kubectl</code> in so the runner has their executable and config in their path.</p>

<p>Running <code>pwd</code> through th gitlab ci file shows <code>/home/gitlab-runner</code> and running <code>whoami</code> shows root, so I installed kubectl as user <code>gitlab-runner</code> and as user <code>root</code> but gitlab-ci-multirunner still complains </p>

<pre><code>$ gcloud config list
bash: line 35: gcloud: command not found

ERROR: Build failed with: exit code 1
</code></pre>

<p>same for <code>kubectl</code>. I probably have a flawed understanding on how gitlab-runner spawns the builds, but it can access the <code>docker</code> install so how do I get it to access the gcloud / kubectl install?</p>

<p>Is there a more straightforward version to deploy to kubernetes / google container engine?</p>

<p>Thanks so much!</p>

<p>You didn't mention what gitlab image you used. It might be useful to look at others', such as:
<a href="https://github.com/sameersbn/docker-gitlab/" rel="nofollow">https://github.com/sameersbn/docker-gitlab/</a></p>

<p>It looks like that configures several paths explicitly via environment variables.</p>

<p>If you're using Docker containers on your runner, you'd need to install kubectl in your Docker image rather than use an executable from the host.
<a href="https://github.com/gitlabhq/gitlabhq/blob/master/doc/ci/docker/using_docker_images.md" rel="nofollow">https://github.com/gitlabhq/gitlabhq/blob/master/doc/ci/docker/using_docker_images.md</a></p>
