记录-gitlab-安装在k8s中的一些注意点

一、已有cert-manager的时候如何配置?

1、首先需要创建一个ClusterIssuer

apiVersion: cert-manager.io/v1
kind: ClusterIssuer
metadata:
  name: letsencrypt-staging
spec:
  acme:
    # You must replace this email address with your own.
    # Let's Encrypt will use this to contact you about expiring
    # certificates, and issues related to your account.
    email: user@example.com
    server: https://acme-staging-v02.api.letsencrypt.org/directory
    privateKeySecretRef:
      # Secret resource that will be used to store the account's private key.
      name: example-issuer-account-key
    # Add a single challenge solver, HTTP01 using nginx

#注意:

email:对应gitlab文档中提到的。

--set certmanager-issuer.email=you@example.com

privateKeySecretRef: <secret-name>

只需要输入一个名称,他会自动创建一个这个名称的tls证书的secret.

二、在通过helm安装gitlab的时候的values.yaml

1.values.yaml中的几点需要注意

1.如果你自己的集群有cert-manager或者Prometheus,则需要将instll改为false.

不然安装会报错。

2.安装执行的cli命令需要注意

1.需要加--namespace,不然他会默认安装在default 的命名空间下,后期管理非常麻烦。

2.如果你是通过ingress发布你的gitlab-web,那么不需要安装官方的命令安装。

helm upgrade --install gitlab gitlab-jh/gitlab --namespace gitlab  --set global.hosts.domain=gitlab.my.com    --set certmanager-issuer.email=ca@gitlab.com -f ./values.yaml

只需要

--set global.hosts.domain=gitlab.my.com \

--set certmanager-issuer.email=ca@gitlab.com

即可。

3.还有一点你如果你在修改values.yaml的domain时,要注意。

他默认会添加一个gitlab的前缀,非常烦。我以为我的ingress的域名为gitlab.my.com,结果自动的为gitlab.gitlab.my.com.

相关推荐
唐大爹4 小时前
项目实战:k8s部署考试系统
云原生·容器·kubernetes
Good_Starry5 小时前
Git介绍--github/gitee/gitlab使用
git·gitee·gitlab·github
wusam8 小时前
螺蛳壳里做道场:老破机搭建的私人数据中心---Centos下Docker学习03(网络及IP规划)
运维·服务器·网络·docker·容器
一直在进步的派大星8 小时前
Docker 从安装到实战
java·运维·docker·微服务·容器
Zl15975315975311 小时前
k8s基础环境部署
云原生·容器·kubernetes
花酒锄作田12 小时前
[kubernetes]二进制方式部署单机k8s-v1.30.5
kubernetes
陌殇殇殇13 小时前
使用GitLab CI构建持续集成案例
运维·ci/cd·云原生·容器·kubernetes·gitlab
吕玉生13 小时前
基于GitLab 的持续集成环境
ci/cd·gitlab
技术钱14 小时前
docker简介
运维·docker·容器
roman_日积跬步-终至千里14 小时前
【docker】docker常见命令
运维·docker·容器