安装K8s服务(二)-安装Gitlab
安装K8s服务(二)-安装Gitlab
1.创建gitlab-pvc
1
kubectl apply -f gitlab-pvc.yaml
2.创建gitlab-postgresql
1
kubectl apply -f gitlab-postgresql.yaml
3.创建gitlab-redis
1
kubectl apply -f gitlab-redis.yaml
4.创建gitlab
注意:
如果gitlab部署在根目录会导致nginx代理静态文件404(ip:port/assets/xxx),需要配置访问项目访问前缀:GITLAB_RELATIVE_URL_ROOT = /gitlab
同时要修改livenessProbe和readinessProbe中的检测地址;
也使用了NodePort来开放gitlab的http和ssh端口。
1
kubectl apply -f gitlab.yaml
本文由作者按照
CC BY 4.0
进行授权