技术解析
我是用 k8s 部署的 gitlab,gitlab 自带的 nginx 是关闭的
clone 地址已经修改( Admin Area > General > Custom Git clone URL for HTTP(S))
---
apiVersion: v1
kind: Service
metadata:
name: gitlab
namespace: default
spec:
clusterIP: None
selector:
app: gitlab
ports:
- protocol: TCP
port: 80
targetPort: 80
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: gitlab
annotations:
nginx.ingress.kubernetes.io/proxy-body-size: "50m"
spec:
tls:
- hosts:
- gitlab.******.com
secretName: gitlab
rules:
- host: gitlab.******.com
http:
paths:
- path: /
pathType: Prefix
bac大带宽服务器kend:
service:
name: gitlab
port:
number: 80