kubernetes1.17.2结合ceph13.2.8部署gitlab12.1.6
[root@bs-k8s-ceph ~]# ceph -s
cluster:
id: 11880418-1a9a-4b55-a353-4b141e2199d8
health: HEALTH_OK services:
mon: 3 daemons, quorum bs-hk-hk01,bs-hk-hk02,bs-k8s-ceph
mgr: bs-hk-hk02(active), standbys: bs-k8s-ceph, bs-hk-hk01
osd: 6 osds: 6 up, 6 in data:
pools: 3 pools, 320 pgs
objects: 416 objects, 978 MiB
usage: 8.7 GiB used, 105 GiB / 114 GiB avail
pgs: 320 active+clean
[root@bs-k8s-master01 ~]# kubectl get pods --all-namespaces
NAMESPACE NAME READY STATUS RESTARTS AGE
default rbd-provisioner-75b85f85bd-8ftdm 0/1 Terminating 12 5d
default rbd-provisioner-75b85f85bd-bk5kz 1/1 Running 4 24h
harbor rbd-provisioner-75b85f85bd-dhnr4 1/1 Terminating 7 3d13h
harbor rbd-provisioner-75b85f85bd-qzzbx 1/1 Running 3 24h
kube-system calico-kube-controllers-5b644bc49c-kv4wb 1/1 Running 67 10d
kube-system calico-node-4jxbp 1/1 Running 5 10d
kube-system calico-node-7t9cj 1/1 Running 12 10d
kube-system calico-node-cchgl 1/1 Running 15 10d
kube-system calico-node-czj76 1/1 Running 7 10d
kube-system calico-node-lxb2s 0/1 Running 15 10d
kube-system calico-node-nmg9t 1/1 Running 8 10d
kube-system coredns-7f9c544f75-bwx9p 1/1 Running 67 10d
kube-system coredns-7f9c544f75-q58mr 1/1 Running 66 10d
kube-system dashboard-metrics-scraper-6b66849c9-qtwzx 1/1 Running 83 10d
kube-system etcd-bs-k8s-master01 1/1 Running 30 10d
kube-system etcd-bs-k8s-master02 1/1 Running 12 10d
kube-system etcd-bs-k8s-master03 1/1 Running 37 10d
kube-system kube-apiserver-bs-k8s-master01 1/1 Running 49 10d
kube-system kube-apiserver-bs-k8s-master02 1/1 Running 22 10d
kube-system kube-apiserver-bs-k8s-master03 1/1 Running 67 10d
kube-system kube-controller-manager-bs-k8s-master01 1/1 Running 49 10d
kube-system kube-controller-manager-bs-k8s-master02 1/1 Running 38 10d
kube-system kube-controller-manager-bs-k8s-master03 1/1 Running 42 10d
kube-system kube-proxy-26ffm 1/1 Running 4 10d
kube-system kube-proxy-298tr 1/1 Running 5 10d
kube-system kube-proxy-hzsmb 1/1 Running 4 10d
kube-system kube-proxy-jb4sq 1/1 Running 5 10d
kube-system kube-proxy-pt94r 1/1 Running 7 10d
kube-system kube-proxy-wljwv 1/1 Running 5 10d
kube-system kube-scheduler-bs-k8s-master01 1/1 Running 46 10d
kube-system kube-scheduler-bs-k8s-master02 1/1 Running 31 10d
kube-system kube-scheduler-bs-k8s-master03 1/1 Running 46 10d
kube-system kubernetes-dashboard-887cbd9c6-j7ptq 1/1 Terminating 30 10d
kube-system kubernetes-dashboard-887cbd9c6-rzlp4 1/1 Running 7 24h
kube-system rbd-provisioner-75b85f85bd-2dclz 1/1 Running 35 3d14h [root@bs-k8s-ceph ~]# ceph osd pool create gitlab 64
pool 'github' created
[root@bs-k8s-ceph ~]# cd /etc/ceph/
[root@bs-k8s-ceph ceph]# ceph auth get-or-create client.gitlab mon 'allow r' osd 'allow class-read, allow rwx pool=gitlab' -o ceph.client.gitlab.keyring
[root@bs-k8s-node01 ~]# ceph auth get-key client.admin | base64
QVFDNmNVSmV2eU8yRnhBQVBxYzE5Mm5PelNnZk5acmg5aEFQYXc9PQ==
[root@bs-k8s-node01 ~]# ceph auth get-key client.gitlab | base64
QVFCUzNFMWVqRDZpTXhBQTgrd3RIajVWb295M1J1QkJDZi9QOXc9PQ==
[root@bs-k8s-master01 gitlab]# kubectl apply -f ceph-gitlab-namespace.yaml
namespace/gitlab created
[root@bs-k8s-master01 gitlab]# kubectl get namespace gitlab
NAME STATUS AGE
gitlab Active <invalid>
[root@bs-k8s-master01 gitlab]# cat ceph-gitlab-namespace.yaml
##########################################################################
#Author: zisefeizhu
#QQ: 2********0
#Date: 2020-02-16
#FileName: ceph-harbor-namespace.yaml
#URL: https://www.cnblogs.com/zisefeizhu/
#Description: The test script
#Copyright (C): 2020 All rights reserved
###########################################################################
apiVersion: v1
kind: Namespace
metadata:
name: gitlab
[root@bs-k8s-node02 ~]# docker tag quay.io/external_storage/rbd-provisioner:latest harbor.linux.com/kubworker/rbd-provisioner:latest
[root@bs-k8s-node02 ~]# docker push harbor.linux.com/kubworker/rbd-provisioner:latest
[root@bs-k8s-master01 gitlab]# kubectl apply -f external-storage-rbd-provisioner.yaml
serviceaccount/rbd-provisioner created
clusterrole.rbac.authorization.k8s.io/rbd-provisioner created
clusterrolebinding.rbac.authorization.k8s.io/rbd-provisioner created
role.rbac.authorization.k8s.io/rbd-provisioner created
rolebinding.rbac.authorization.k8s.io/rbd-provisioner created
deployment.apps/rbd-provisioner created
[root@bs-k8s-master01 gitlab]# kubectl get pods -n gitlab
NAME READY STATUS RESTARTS AGE
rbd-provisioner-75b85f85bd-t224w 1/1 Running 0 64s
[root@bs-k8s-master01 gitlab]# cat external-storage-rbd-provisioner.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
name: rbd-provisioner
namespace: gitlab
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: rbd-provisioner
rules:
- apiGroups: [""]
resources: ["persistentvolumes"]
verbs: ["get", "list", "watch", "create", "delete"]
- apiGroups: [""]
resources: ["persistentvolumeclaims"]
verbs: ["get", "list", "watch", "update"]
- apiGroups: ["storage.k8s.io"]
resources: ["storageclasses"]
verbs: ["get", "list", "watch"]
- apiGroups: [""]
resources: ["events"]
verbs: ["create", "update", "patch"]
- apiGroups: [""]
resources: ["endpoints"]
verbs: ["get", "list", "watch", "create", "update", "patch"]
- apiGroups: [""]
resources: ["services"]
resourceNames: ["kube-dns"]
verbs: ["list", "get"]
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: rbd-provisioner
subjects:
- kind: ServiceAccount
name: rbd-provisioner
namespace: gitlab
roleRef:
kind: ClusterRole
name: rbd-provisioner
apiGroup: rbac.authorization.k8s.io ---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: rbd-provisioner
namespace: gitlab
rules:
- apiGroups: [""]
resources: ["secrets"]
verbs: ["get"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: rbd-provisioner
namespace: gitlab
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: rbd-provisioner
subjects:
- kind: ServiceAccount
name: rbd-provisioner
namespace: gitlab ---
apiVersion: apps/v1
kind: Deployment
metadata:
name: rbd-provisioner
namespace: gitlab
spec:
replicas: 1
selector:
matchLabels:
app: rbd-provisioner
strategy:
type: Recreate
template:
metadata:
labels:
app: rbd-provisioner
spec:
containers:
- name: rbd-provisioner
image: "harbor.linux.com/kubworker/rbd-provisioner:latest"
env:
- name: PROVISIONER_NAME
value: ceph.com/rbd
serviceAccount: rbd-provisioner
imagePullSecrets:
- name: login
[root@bs-k8s-master01 gitlab]# kubectl apply -f ceph-gitlab-secret.yaml
secret/ceph-gitlab-admin-secret created
secret/ceph-gitlab-gitlab-secret created
[root@bs-k8s-master01 gitlab]# cat ceph-gitlab-secret.yaml
##########################################################################
#Author: zisefeizhu
#QQ: 2********0
#Date: 2020-02-16
#FileName: ceph-harbor-secret.yaml
#URL: https://www.cnblogs.com/zisefeizhu/
#Description: The test script
#Copyright (C): 2020 All rights reserved
###########################################################################
apiVersion: v1
kind: Secret
metadata:
name: ceph-gitlab-admin-secret
namespace: gitlab
data:
key: QVFDNmNVSmV2eU8yRnhBQVBxYzE5Mm5PelNnZk5acmg5aEFQYXc9PQ==
type: kubernetes.io/rbd
---
apiVersion: v1
kind: Secret
metadata:
name: ceph-gitlab-gitlab-secret
namespace: gitlab
data:
key: QVFCUzNFMWVqRDZpTXhBQTgrd3RIajVWb295M1J1QkJDZi9QOXc9PQ==
type: kubernetes.io/rbd
[root@bs-k8s-master01 gitlab]# kubectl apply -f ceph-gitlab-storageclass.yaml
storageclass.storage.k8s.io/ceph-gitlab created
[root@bs-k8s-master01 gitlab]# cat ceph-gitlab-storageclass.yaml
##########################################################################
#Author: zisefeizhu
#QQ: 2********0
#Date: 2020-02-16
#FileName: ceph-harbor-storageclass.yaml
#URL: https://www.cnblogs.com/zisefeizhu/
#Description: The test script
#Copyright (C): 2020 All rights reserved
###########################################################################
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: ceph-gitlab
annotations:
storageclass.kubernetes.io/is-default-class: "false"
provisioner: ceph.com/rbd
reclaimPolicy: Retain
parameters:
monitors: 20.0.0.206:6789,20.0.0.207:6789,20.0.0.208:6789
adminId: admin
adminSecretName: ceph-gitlab-admin-secret
adminSecretNamespace: gitlab
pool: gitlab
fsType: xfs
userId: gitlab
userSecretName: ceph-gitlab-gitlab-secret
imageFormat: "2"
imageFeatures: "layering"
[root@bs-k8s-master01 gitlab]# kubectl apply -f ceph-gitlab-pvc.yaml
persistentvolumeclaim/pvc-ceph-gitlab created
[root@bs-k8s-master01 gitlab]# kubectl get pv -n gitlab
NAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM STORAGECLASS REASON AGE
pvc-494a130d-018c-4be3-9b31-e951cc4367a5 20Gi RWO Retain Bound default/wp-pv-claim ceph-rbd 4d14h
pvc-8ffa3182-a2f6-47d9-a71d-ff8e8b379a16 1Gi RWO Retain Bound default/ceph-pvc ceph-rbd 4d16h
pvc-ac7d3a09-123e-4614-886c-cded8822a078 20Gi RWO Retain Bound default/mysql-pv-claim ceph-rbd 4d14h
pvc-ba59cba5-e394-4b19-8c4b-4018162bbe69 1Gi RWO Retain Bound harbor/pvc-ceph-harbor ceph-harbor 3d14h
[root@bs-k8s-master01 gitlab]# kubectl get pvc -n gitlab
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
pvc-ceph-gitlab Bound pvc-c7c7aed3-4f8f-4801-a9db-c13f9390af8c 1Gi RWO ceph-gitlab 21s
[root@bs-k8s-master01 gitlab]# cat ceph-gitlab-pvc.yaml
##########################################################################
#Author: zisefeizhu
#QQ: 2********0
#Date: 2020-02-16
#FileName: ceph-harbor-pvc.yaml
#URL: https://www.cnblogs.com/zisefeizhu/
#Description: The test script
#Copyright (C): 2020 All rights reserved
###########################################################################
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: pvc-ceph-gitlab
namespace: gitlab
spec:
storageClassName: ceph-gitlab
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
[root@bs-k8s-ceph ceph]# ceph osd pool application enable gitlab rbd
enabled application 'rbd' on pool 'gitlab'
[root@bs-k8s-ceph ceph]# ceph -s
cluster:
id: 11880418-1a9a-4b55-a353-4b141e2199d8
health: HEALTH_OK services:
mon: 3 daemons, quorum bs-hk-hk01,bs-hk-hk02,bs-k8s-ceph
mgr: bs-hk-hk02(active), standbys: bs-k8s-ceph, bs-hk-hk01
osd: 6 osds: 6 up, 6 in data:
pools: 4 pools, 384 pgs
objects: 420 objects, 978 MiB
usage: 8.9 GiB used, 105 GiB / 114 GiB avail
pgs: 384 active+clean
[root@bs-k8s-master01 gitlab]# echo -n "admin" > ./username
[root@bs-k8s-master01 gitlab]# echo -n "zisefeizhzu" > ./password
[root@bs-k8s-master01 gitlab]# kubectl create secret generic db-user-pass --from-file=./username --from-file=./password
secret/db-user-pass created
[root@bs-k8s-master01 gitlab]# kubectl apply -f ceph-redis-pvc.yaml
persistentvolumeclaim/pvc-ceph-redis created
[root@bs-k8s-master01 gitlab]# kubectl get pvc -n gitlab
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
pvc-ceph-gitlab Bound pvc-c7c7aed3-4f8f-4801-a9db-c13f9390af8c 1Gi RWO ceph-gitlab 53m
pvc-ceph-redis Bound pvc-f8051bd4-4617-4823-b190-3581ec502d7e 1Gi RWO ceph-gitlab 15s
[root@bs-k8s-master01 gitlab]# cat ceph-redis-pvc.yaml
##########################################################################
#Author: zisefeizhu
#QQ: 2********0
#Date: 2020-02-20
#FileName: ceph-redis-pvc.yaml
#URL: https://www.cnblogs.com/zisefeizhu/
#Description: The test script
#Copyright (C): 2020 All rights reserved
###########################################################################
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: pvc-ceph-redis
namespace: gitlab
spec:
storageClassName: ceph-gitlab
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
[root@bs-k8s-master01 gitlab]# kubectl apply -f gitlab-redis.yaml
deployment.apps/redis created
service/redis created
[root@bs-k8s-master01 gitlab]# kubectl get pods -n gitlab -o wide
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
rbd-provisioner-75b85f85bd-t224w 1/1 Running 0 81m 10.209.145.42 bs-k8s-node02 <none> <none>
redis-598f9d7ccb-vmrpz 1/1 Running 0 2m7s 10.209.208.22 bs-k8s-node03 <none> <none>
[root@bs-k8s-master01 gitlab]# cat gitlab-redis.yaml
##########################################################################
#Author: zisefeizhu
#QQ: 2********0
#Date: 2020-02-20
#FileName: gitlab-redis.yaml
#URL: https://www.cnblogs.com/zisefeizhu/
#Description: The test script
#Copyright (C): 2020 All rights reserved
###########################################################################
apiVersion: apps/v1
kind: Deployment
metadata:
name: redis
namespace: gitlab
labels:
name: redis
spec:
selector:
matchLabels:
name: redis
template:
metadata:
name: redis
labels:
name: redis
spec:
containers:
- name: redis
image: sameersbn/redis
imagePullPolicy: IfNotPresent
ports:
- name: redis
containerPort: 6379
volumeMounts:
- mountPath: /var/lib/redis
name: data
livenessProbe:
exec:
command:
- redis-cli
- ping
initialDelaySeconds: 30
timeoutSeconds: 5
readinessProbe:
exec:
command:
- redis-cli
- ping
initialDelaySeconds: 5
timeoutSeconds: 1
volumes:
- name: data
persistentVolumeClaim:
claimName: pvc-ceph-redis
---
apiVersion: v1
kind: Service
metadata:
name: redis
namespace: gitlab
labels:
name: redis
spec:
ports:
- name: redis
port: 6379
targetPort: redis
selector:
name: redis
[root@bs-k8s-master01 gitlab]# cp ceph-redis-pvc.yaml ceph-postgresql-pvc.yaml
[root@bs-k8s-master01 gitlab]# vim ceph-postgresql-pvc.yaml
[root@bs-k8s-master01 gitlab]# kubectl apply -f ceph-postgresql-pvc.yaml
persistentvolumeclaim/pvc-ceph-postgresql created
[root@bs-k8s-master01 gitlab]# kubectl get pvc -n gitlab
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
pvc-ceph-gitlab Bound pvc-c7c7aed3-4f8f-4801-a9db-c13f9390af8c 1Gi RWO ceph-gitlab 23h
pvc-ceph-postgresql Bound pvc-5995ff51-08fe-4f66-aca8-bda906c44c83 1Gi RWO ceph-gitlab 21h
pvc-ceph-redis Bound pvc-f8051bd4-4617-4823-b190-3581ec502d7e 1Gi RWO ceph-gitlab 22h
[root@bs-k8s-master01 gitlab]# cat ceph-postgresql-pvc.yaml
##########################################################################
#Author: zisefeizhu
#QQ: 2********0
#Date: 2020-02-20
#FileName: ceph-redis-pvc.yaml
#URL: https://www.cnblogs.com/zisefeizhu/
#Description: The test script
#Copyright (C): 2020 All rights reserved
###########################################################################
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: pvc-ceph-postgresql
namespace: gitlab
spec:
storageClassName: ceph-gitlab
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
[root@bs-k8s-master01 gitlab]# kubectl apply -f gitlab-postgresql.yaml
deployment.apps/postgresql created
service/postgresql created
[root@bs-k8s-master01 gitlab]# kubectl get pods -n gitlab
NAME READY STATUS RESTARTS AGE
postgresql-8c84b7698-w4wpp 1/1 Running 0 5m31s
rbd-provisioner-75b85f85bd-t224w 1/1 Running 0 104m
redis-598f9d7ccb-vmrpz 1/1 Running 0 24m
[root@bs-k8s-master01 gitlab]# cat gitlab-postgresql.yaml
##########################################################################
#Author: zisefeizhu
#QQ: 2********0
#Date: 2020-02-20
#FileName: gitlab-postgresql.yaml
#URL: https://www.cnblogs.com/zisefeizhu/
#Description: The test script
#Copyright (C): 2020 All rights reserved
###########################################################################
apiVersion: apps/v1
kind: Deployment
metadata:
name: postgresql
namespace: gitlab
labels:
name: postgresql
spec:
selector:
matchLabels:
name: postgresql
template:
metadata:
name: postgresql
labels:
name: postgresql
spec:
containers:
- name: postgresql
image: sameersbn/postgresql
imagePullPolicy: IfNotPresent
env:
- name: DB_USER
value: gitlab
- name: DB_PASS
value: zisefeizhu
- name: DB_NAME
value: gitlab_production
- name: DB_EXTENSION
value: pg_trgm
ports:
- name: postgres
containerPort: 5432
volumeMounts:
- mountPath: /var/lib/postgresql
name: data
livenessProbe:
exec:
command:
- pg_isready
- -h
- localhost
- -U
- postgres
initialDelaySeconds: 30
timeoutSeconds: 5
readinessProbe:
exec:
command:
- pg_isready
- -h
- localhost
- -U
- postgres
initialDelaySeconds: 5
timeoutSeconds: 1
volumes:
- name: data
persistentVolumeClaim:
claimName: pvc-ceph-postgresql
---
apiVersion: v1
kind: Service
metadata:
name: postgresql
namespace: gitlab
labels:
name: postgresql
spec:
ports:
- name: postgres
port: 5432
targetPort: postgres
selector:
name: postgresql
[root@bs-k8s-master01 gitlab]# kubectl apply -f gitlab-gitlab.yaml
deployment.apps/gitlab created
service/gitlab created
ingress.extensions/gitlab created
[root@bs-k8s-master01 gitlab]# kubectl get ingress -n gitlab
NAME HOSTS ADDRESS PORTS AGE
gitlab gitlab.linux.com 80 106s
[root@bs-k8s-master01 gitlab]# kubectl get service -n gitlab
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
gitlab NodePort 10.96.120.85 <none> 80:32208/TCP,22:30022/TCP 2m33s
postgresql ClusterIP 10.111.30.80 <none> 5432/TCP 41m
redis ClusterIP 10.103.127.83 <none> 6379/TCP
[root@bs-k8s-master01 gitlab]# kubectl get pods -n gitlab -o wide
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
gitlab-6468b9f55c-mzcmj 1/1 Running 1 4m59s 10.209.208.41 bs-k8s-node03 <none> <none>
postgresql-8c84b7698-w4wpp 1/1 Running 0 101m 10.209.145.43 bs-k8s-node02 <none> <none>
rbd-provisioner-75b85f85bd-t224w 1/1 Running 0 3h20m 10.209.145.42 bs-k8s-node02 <none> <none>
redis-598f9d7ccb-vmrpz 1/1 Running 0 120m 10.209.208.22 bs-k8s-node03 <none>
[root@bs-k8s-master01 gitlab]# cat gitlab-gitlab.yaml
##########################################################################
#Author: zisefeizhu
#QQ: 2********0
#Date: 2020-02-20
#FileName: gitlab-gitlab.yaml
#URL: https://www.cnblogs.com/zisefeizhu/
#Description: The test script
#Copyright (C): 2020 All rights reserved
###########################################################################
apiVersion: apps/v1
kind: Deployment
metadata:
name: gitlab
namespace: gitlab
labels:
name: gitlab
spec:
selector:
matchLabels:
name: gitlab
template:
metadata:
name: gitlab
labels:
name: gitlab
spec:
containers:
- name: gitlab
image: sameersbn/gitlab:12.1.6
imagePullPolicy: IfNotPresent
env:
- name: TZ
value: Asia/Shanghai
- name: GITLAB_TIMEZONE
value: Beijing
- name: GITLAB_SECRETS_DB_KEY_BASE
value: long-and-random-alpha-numeric-string
- name: GITLAB_SECRETS_SECRET_KEY_BASE
value: long-and-random-alpha-numeric-string
- name: GITLAB_SECRETS_OTP_KEY_BASE
value: long-and-random-alpha-numeric-string
- name: GITLAB_ROOT_PASSWORD
value: zisefeizhu
- name: GITLAB_ROOT_EMAIL
value: 2350835860@qq.com
- name: GITLAB_HOST
value: gitlab.linux.com
- name: GITLAB_PORT
value: "80"
- name: GITLAB_SSH_PORT
value: "30022"
- name: GITLAB_NOTIFY_ON_BROKEN_BUILDS
value: "true"
- name: GITLAB_NOTIFY_PUSHER
value: "false"
- name: GITLAB_BACKUP_SCHEDULE
value: daily
- name: GITLAB_BACKUP_TIME
value: 01:00
- name: DB_TYPE
value: postgres
- name: DB_HOST
value: postgresql
- name: DB_PORT
value: "5432"
- name: DB_USER
value: gitlab
- name: DB_PASS
value: zisefeizhu
- name: DB_NAME
value: gitlab_production
- name: REDIS_HOST
value: redis
- name: REDIS_PORT
value: "6379"
ports:
- name: http
containerPort: 80
- name: ssh
containerPort: 22
volumeMounts:
- mountPath: /home/git/data
name: data
livenessProbe:
httpGet:
path: /
port: 80
initialDelaySeconds: 180
timeoutSeconds: 5
readinessProbe:
httpGet:
path: /
port: 80
initialDelaySeconds: 5
timeoutSeconds: 1
volumes:
- name: data
persistentVolumeClaim:
claimName: pvc-ceph-gitlab
---
apiVersion: v1
kind: Service
metadata:
name: gitlab
namespace: gitlab
labels:
name: gitlab
spec:
ports:
- name: http
port: 80
targetPort: http
- name: ssh
port: 22
targetPort: ssh
nodePort: 30022
type: NodePort
selector:
name: gitlab
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: gitlab
namespace: gitlab
annotations:
kubernetes.io/ingress.class: traefik
spec:
rules:
- host: gitlab.linux.com
http:
paths:
- backend:
serviceName: gitlab
servicePort: http
kubernetes1.17.2结合ceph13.2.8部署gitlab12.1.6的更多相关文章
- kubernetes 1.17.2结合ceph13.2.8 实现jenkins部署并用traefik2.1代理
注:关于ceph.kubernetes集群的部署在此不声明,相信搜到本篇博文,你一定对ceph.kubernetes的部署环节手刃有余. 注:本篇博文牵扯到的技术点有:ceph.kubernetes. ...
- kubeasz部署高可用kubernetes1.17.2 并实现traefik2.1.2部署
模板机操作 # cat /etc/redhat-release CentOS Linux release 7.6.1810 (Core) # uname -a //内核升级到4.4.X以后, 关于如何 ...
- kubernetes1.17集群部署
学习自:https://www.jianshu.com/p/789bc867feaa ###批量配置免秘钥 密码可自行修改 这里的密码是123456 yum install -y expect ss ...
- 在kubernetes1.17.2上结合ceph部署efk
简绍 应用程序和系统日志可以帮助我们了解集群内部的运行情况,日志对于我们调试问题和监视集群情况也是非常有用的.而且大部分的应用都会有日志记录,对于传统的应用大部分都会写入到本地的日志文件之中.对于容器 ...
- K8S(17)二进制的1.15版本部署hpa自动伸缩
K8S(17)二进制部署的K8S(1.15)部署hpa功能 目录 K8S(17)二进制部署的K8S(1.15)部署hpa功能 零.参考文件: 一.生成metrics-proxy证书 二.修改apise ...
- Kubernetes 1.17.2 高可用部署
20.0.0.200 10.0.0.200 bs-k8s-master01 管理节点 2c2g 20.0.0.201 10.0.0.201 bs-k8s-master02 管理节点 2c2 ...
- kubernetes 1.17.2 kubeadm部署 证书修改为100年
[root@hs-k8s-master01 ~]# cd /data/ [root@hs-k8s-master01 data]# ls docker [root@hs-k8s-master01 dat ...
- 部署harbor以https模式和k8s对接
集群时间同步 我们在之前的kubeasz部署高可用kubernetes1.17.2 并实现traefik2.1.2部署篇已经实现了基于chrony的时间同步 [root@bs-k8s-master01 ...
- CentOS利用Nginx+Docker部署.netcore应用
安装docker 官方文档https://docs.docker.com/engine/installation/linux/docker-ce/centos/ [root@sn ~]# yum re ...
随机推荐
- element ui 停止维护了
️♂️ element ui 停止维护了 最近看到有人说 element ui 已经停止维护了,还有点不相信; 不过到 github 验证一下,好像是真的呀 4 个月,没有任何更新了 https:/ ...
- dart 匹配基本数组
List<dynamic> evalList(String text) { var r = []; var i = 0; var isList = false; void parseSta ...
- 12月17日BGV币行情分析
目前BGV收于353.95美金,较前一交易日上涨28.25%. 非小号数据显示,BGV最大客户aofexpay.ngk出现+490.2349的持币变化,其次减仓数额均不大,分别为-80.1,-30,- ...
- 一条sql语句的执行过程
一条select语句执行流程 第一步:连接器 连接器负责跟客户端建立连接.获取权限.维持和管理连接.如果用户名密码验证通过后,连接器会到权限表里面查出你拥有的权限.之后该连接的权限验证都依赖于刚查出来 ...
- canal数据同步 客户端代码实现
1.引入相关依赖 <dependencies> <dependency> <groupId>org.springframework.boot</groupId ...
- 鸿蒙开源第三方组件——进度轮ProgressWheel
目录:1.前言2.背景3.组件功能展示4.Sample解析5.Library解析6.作者系列文章合集 前言 基于安卓平台的进度轮组件ProgressWheel(https://github.com/A ...
- HDFS 03 - 你能说说 HDFS 的写入和读取过程吗?
目录 1 - HDFS 文件的写入 1.1 写入过程 1.2 写入异常时的处理 1.3 写入的一致性 2 - HDFS 文件的读取 2.1 读取过程 2.2 读取异常时的处理 版权声明 1 - HDF ...
- h5返回上一页ios页面不刷新
var isPage=false; window.addEventListener('pageshow', function () { if (isPage) { window.loc ...
- 解决springboot项目打成jar包部署到linux服务器后上传图片无法访问的问题
前言:目前大三,自己也在学习和摸索的阶段.在和学校的同学一起做前后端分离项目的时候,我们发现将后端打包成jar,然后部署到服务器中通过java -jar xxx.jar运行项目以后,项目中存在文件上传 ...
- HDOJ-1024(动态规划+滚动数组)
Max Sum Plus Plus HDOJ-1024 动态转移方程:dp[i][j]=max(dp[i][j-1]+a[j],max(dp[i-1][k])+a[j]) (0<k<j) ...