[Kubernetes (K8S)] Helm install GitLab Runner that works with GitLab CI/CD to run jobs in a pipeline within Kubernetes (K8S)
GitLab Runner
GitLab Runner is an application that works with GitLab CI/CD to run jobs in a pipeline.
GitLab Runner has the following features.
-
Run multiple jobs concurrently.
-
Use multiple tokens with multiple servers (even per-project).
-
Limit the number of concurrent jobs per-token.
-
Jobs can be run:
-
Locally.
-
Using Docker containers.
-
Using Docker containers and executing job over SSH.
-
Using Docker containers with autoscaling on different clouds and virtualization hypervisors.
-
Connecting to a remote SSH server.
-
-
Is written in Go and distributed as single binary without any other requirements.
-
Supports Bash and Windows PowerShell.
-
Works on GNU/Linux, macOS, and Windows (pretty much anywhere you can run Docker).
-
Allows customization of the job running environment.
-
Automatic configuration reload without restart.
-
Easy to use setup with support for Docker, Docker-SSH, Parallels, or SSH running environments.
-
Enables caching of Docker containers.
-
Easy installation as a service for GNU/Linux, macOS, and Windows.
-
Embedded Prometheus metrics HTTP server.
-
Referee workers to monitor and pass Prometheus metrics and other job-specific data to GitLab.
This article is about how to use Helm to deploy GitLab Runner on Kubernetes (K8S).
Prerequisites
-
Kubernetes (K8S)
Kubernetes (K8s) is an open-source system for automating deployment, scaling, and management of containerized applications.For more information about installing and using Kubernetes (K8s), see the Kubernetes (K8s) Docs.
-
Helm
Helm is the best way to find, share, and use software built for Kubernetes.For more information about installing and using Helm, see the Helm Docs.
Installation
Custom Values.yaml
Remember to replace content within {{ }}
with your prefer values.
1 | # values.yaml |
Install by Helm
Helm install gitlab-runner into gitlab-runner namespace.
1 | crate namespace: |
See Helm release about gitlab-runner.
1 | helm list --namespace gitlab-runner |
See pods about gitlab-runner.
1 | kubectl get pods -n gitlab-runner |
References
[1] GitLab Runner Helm Chart | GitLab - https://docs.gitlab.com/runner/install/kubernetes.html
[3] GitLab Runner部署(kubernetes环境)-博客 - http://www.soolco.com/post/76550_1_1.html
[4] GitLab Runner | GitLab - https://docs.gitlab.com/runner/