gitlab-runner k8s cicd小demo
安装helm3wget http://xxxxmv helm /usr/local/bin安装gitlab-runner到k8shelm repo add gitlab https://charts.gitlab.io编辑values.yamlimagePullPolicy: IfNotPresentgitlabUrl: "http://192.168.222.130:9980"runnerReg
·
- 安装helm3
wget http://xxxx
mv helm /usr/local/bin - 安装gitlab-runner到k8s
helm repo add gitlab https://charts.gitlab.io
编辑values.yaml
创建命名空间imagePullPolicy: IfNotPresent gitlabUrl: "http://192.168.222.130:9980" runnerRegistrationToken: "131yjJMtno82us1B3C5t" concurrent: 10 checkInterval: 30 logLevel: info rbac: create: true metrics: enabled: false runners: config: | [[runners]] clone_url = "http://192.168.222.130:9980" [runners.kubernetes] namespace = "{{.Release.Namespace}}" image = "ubuntu:20.04" [[runners.kubernetes.volumes.host_path]] name = "docker" mount_path = "/var/run/docker.sock" host_path = "/var/run/docker.sock" privileged: "true" name: kubernetes-runner tags: "kubernetes,runner" securityContext: runAsUser: 100 fsGroup: 65533
kubectl create ns kubeops
安装
helm install --namespace kube-ops gitlab-ops-runner -f values.yaml gitlab/gitlab-runner - 编写.gitlab-ci.yml测试
image: ubuntu stages: - build build: stage: build tags: - kubernetes script: - echo "123"
更多推荐
已为社区贡献1条内容
所有评论(0)