taro-mall icon indicating copy to clipboard operation
taro-mall copied to clipboard

Gitlab Helm安装日志,实现项目全自动发布到k8s集群

Open apersonw opened this issue 5 years ago • 0 comments

系统:Mac k8s集群:使用的docker-for-desktop 一、Docker配置和K8s配置

  1. CPUs:6
  2. Memory:16 GiB
  3. Swap:2.0 GiB
  4. 代理配置:Manual proxy configuration,地址请自行填写ss的,一般为127.0.0.1:1081
  5. Enable kubernetes选中

注:必须配置代理,否则无法拉取镜像,此配置为推荐配置,最小配置为2核4G,以下为k8s需要的镜像 image

二、helm配置

  1. brew install kubernetes-helm
  2. 执行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版本是企业版,请按需选择
  3. 当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

apersonw avatar Jul 12 '19 07:07 apersonw