helm部署gitlab-runner问题解决

关于.gitlab-ci.yml中build镜像时,docker守护进程未启动错误

参考:https://docs.gitlab.com/runner/install/kubernetes.html

问题截图

解决方法

values.yaml中关于conf.toml添加
注意:确保每个节点的docker正常运行

yaml 复制代码
          [[runners.kubernetes.volumes.host_path]]
            name = "docker"
            mount_path = "/var/run/docker.sock"
            read_only = false
            host_path = "/var/run/docker.sock"

关于指定节点只运行gitlab-runner和worker

添加污点配置,kubectl taint node node1 runner=gitlab-runner-only:NoSchedule,并修改configmap配置:

复制代码
cat >>/home/gitlab-runner/.gitlab-runner/config.toml <<EOF
    [runners.kubernetes.node_tolerations]
      "runner=gitlab-runner-only" = "NoSchedule"
EOF

gitlab-runner和worker调度到指定节点

添加标签选择器,添加节点标签,修改values.yaml

kubectl label node node1 runner=gitlab-runner-only

runners:

...

nodeSelector:

runner: gitlab-runner-only

nodeSelector:

runner: gitlab-runner-only

...

相关推荐
jekc8681 天前
Ubuntu-GitLab
服务器·ubuntu·gitlab
在路上走着走着2 天前
openclaw v2026.4.5 版本 提示 pairing required 解决方案
gitlab
Gazer_S6 天前
【GitLab npm Registry 非标准端口安装问题解决方案】
前端·npm·gitlab
-KamMinG6 天前
Gitlab版本升级方案-13.x到17.x
gitlab
菜鸡00018 天前
把一个项目传到 GitLab 的某个群组
大数据·elasticsearch·gitlab
AlbertS9 天前
记一次推送lfs失败不能迁移git仓库到新的gitlab的问题
git·ai·gitlab·lfs·rejected
日更嵌入式的打工仔9 天前
Windows 下 GitLab 完整使用指南
windows·gitlab
会飞的大可9 天前
Jenkins vs GitLab CI/CD:2026 企业级 CI/CD 工具深度选型评测
ci/cd·gitlab·jenkins
庭風10 天前
让 AI 从需求直接走到 MR:我开源了一个面向 GitLab 的工作流 MCP
gitlab
Sakuyu4346810 天前
Git-GitLab-JenKins
git·gitlab·jenkins