Kubernetes基于helm部署gitlab

Kubernetes基于helm部署gitlab

gitlab支持多种安装方式,有二进制安装、helm cahrt安装、operator安装、docker安装以及基于源码构建等。本文主要介绍在k8s环境下基于helm包进行安装。

参考文档:

  1. https://docs.gitlab.com/charts/installation/index.html
  2. https://docs.gitlab.cn/charts/installation/

gitlab包括通用版本和中文版本(极狐),极狐为中外合资公司发布的版本。

准备工作

  1. Kubernetes 集群

  2. helm已经安装

  3. 负载均衡器,为ingress-nginx控制器提供EXTERNAL-IP,本文使用metallb,部署参考https://metallb.io/installation/

  4. 默认存储类

以下是具体的环境信息:

# k8s环境信息
root@master1:~# kubectl get node -o wide
NAME      STATUS   ROLES           AGE   VERSION   INTERNAL-IP    EXTERNAL-IP   OS-IMAGE           KERNEL-VERSION     CONTAINER-RUNTIME
master1   Ready    control-plane   11d   v1.28.2   192.168.0.51   <none>    Ubuntu 24.04 LTS   6.8.0-35-generic   containerd://1.7.12
master2   Ready    control-plane   11d   v1.28.2   192.168.0.52   <none>    Ubuntu 24.04 LTS   6.8.0-35-generic   containerd://1.7.12
master3   Ready    control-plane   11d   v1.28.2   192.168.0.53   <none>    Ubuntu 24.04 LTS   6.8.0-35-generic   containerd://1.7.12
worker1   Ready    <none>          11d   v1.27.1   192.168.0.54   <none>    Ubuntu 24.04 LTS   6.8.0-35-generic   containerd://1.7.12

# helm版本
root@master1:~# helm version
version.BuildInfo{
   Version:"v3.15.2", GitCommit:"1a500d5625419a524fdae4b33de351cc4f58ec35", GitTreeState:"clean", GoVersion:"go1.22.4"}

# 操作系统版本
root@master1:~# cat /etc/issue
Ubuntu 24.04 LTS \n \l

root@master1:~# uname -a
Linux master1 6.8.0-35-generic #35-Ubuntu SMP PREEMPT_DYNAMIC Mon May 20 15:51:52 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

# 存储类
root@master1:~# kubectl get sc -n openebs
NAME                     PROVISIONER               RECLAIMPOLICY   VOLUMEBINDINGMODE      ALLOWVOLUMEEXPANSION   AGE
mayastor-etcd-localpv    openebs.io/local          Delete          WaitForFirstConsumer   false                  24h
mayastor-loki-localpv    openebs.io/local          Delete          WaitForFirstConsumer   false                  24h
openebs-hostpath         openebs.io/local          Delete          WaitForFirstConsumer   false                  24h
openebs-single-replica   io.openebs.csi-mayastor   Delete          Immediate              true                   24h

# 设置openebs-hostpath为默认的存储类
root@master1:~# kubectl patch storageclass openebs-hostpath -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'
storageclass.storage.k8s.io/openebs-hostpath patched

版本说明

gitlab chart版本和gitlab版本号不是一一对应的,有映射关系,可以通过如下命令查看:

# 添加gitlab helm 仓库
# gitlab
helm repo add gitlab https://charts.gitlab.io/
# 极狐gitlab
helm repo add gitlab-jh h
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

lldhsds

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值