Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

391
Vistas
Use gitlab-ci (or any CI) with kubernetes or google container engine (gitlab-runner won't find kubectl)

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

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

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

$ gcloud config list
bash: line 35: gcloud: command not found

ERROR: Build failed with: exit code 1

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

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

Thanks so much!

over 4 years ago · Santiago Trujillo
2 Respuestas
Responde la pregunta

0

You didn't mention what gitlab image you used. It might be useful to look at others', such as: https://github.com/sameersbn/docker-gitlab/

It looks like that configures several paths explicitly via environment variables.

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. https://github.com/gitlabhq/gitlabhq/blob/master/doc/ci/docker/using_docker_images.md

over 4 years ago · Santiago Trujillo Denunciar

0

You could try the new integration using spread. From the blog post:

To use Spread with GitLab CI:

  1. Add the correct image to .gitlab-ci.yml:

    deploy:
      stage: deploy
      image: redspreadapps/gitlabci
      script:
      - null-script
    
  2. Set the environment variables to what makes sense. See the documentation of the environment variables.
over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda