taro-mall
taro-mall copied to clipboard
Gitlab Helm安装日志,实现项目全自动发布到k8s集群
系统:Mac k8s集群:使用的docker-for-desktop 一、Docker配置和K8s配置
- CPUs:6
- Memory:16 GiB
- Swap:2.0 GiB
- 代理配置:Manual proxy configuration,地址请自行填写ss的,一般为127.0.0.1:1081
- Enable kubernetes选中
注:必须配置代理,否则无法拉取镜像,此配置为推荐配置,最小配置为2核4G,以下为k8s需要的镜像
二、helm配置
- brew install kubernetes-helm
- 执行helm安装命令如下:
helm upgrade --install gitlab gitlab/gitlab
--timeout 600
--set global.hosts.https=false \ #关闭https --set global.hosts.domain=example.com \ #你的域名 --set global.ingress.tls.enabled=false \ #不开启tls --set [email protected]
--set global.edition=ce #安装ce版本,ee版本是企业版,请按需选择 - 当postgres数据库镜像拉取后并运行,则bash进去创建gitlab数据库
注:如果镜像一直拉取不下来,请检查是否翻墙正确,99%的可能性都是这个问题,gitlab-runner注册地址不允许填写127.0.0.1
注:安装成功后可通过此命令获取root账号的密码:kubectl get secret gitlab-gitlab-initial-root-password -ojsonpath='{.data.password}' | base64 --decode ; echo