Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

400
Visualizações
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 Respostas
Responde à pergunta

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 Relatório

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda