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 ...
随机推荐
- git cli all in one
git cli all in one https://www.atlassian.com/git/tutorials/learn-git-with-bitbucket-cloud git create ...
- Object.stringify 循环引用 bug & TypeError: Converting circular structure to JSON
Object.stringify 循环引用 bug & TypeError: Converting circular structure to JSON var obj = { a: &quo ...
- NGK与AOFEX交易所达成战略合作,BGV即将上线A网!
据NGK官方消息,NGK官方已经与英国伦敦知名交易所AOFEX交易所达成战略合作,将于12月2日全球首发BGV,现已开启充值服务.同时,在12月3日15:00,用户可以参与BGV交易:在12月4日15 ...
- 为什么建议选择居住在墨尔本CBD以南2公里内
英国房地产公司PAUL ADAMS ARCHITECT ,简称PPA(公司编号:07635831)成立于2011年,是一家成立近十年的老牌房地产公司.PAA公司一直有着自己的房地产理念,秉持房子是用来 ...
- 离场定高转弯DF与CF的对比
也许是刚学会CAD的缘故,配合风螺旋插件,画图的感觉真是蛮爽的,忍不住画了一张又一张. 接着昨天的离场保护区,我们来聊一下PBN指定高度转弯保护区的画法.指定高度转弯的计算本身没有太多复杂的地方,真正 ...
- 使用 Tye 辅助开发 k8s 应用竟如此简单(三)
续上篇,这篇我们来进一步探索 Tye 更多的使用方法.本篇我们来了解一下如何在 Tye 中如何对数据库进行链接. Newbe.Claptrap 是一个用于轻松应对并发问题的分布式开发框架.如果您是首次 ...
- C# 类中操作主窗体控件
主窗体程序: using System; using System.Collections.Generic; using System.ComponentModel; using System.Dat ...
- 处理ios键盘弹出按钮点击click失效
用ontouchstart绑定事件即可,然后用 document.activeElement.blur();让键盘收起 this.value = value.replace(/\s/g, " ...
- [计算机图形学]绘制填充模型:重心坐标、z-buffer
目录 一.点乘和叉乘 0. 向量表示 1. 点乘 2.叉乘 2.1 坐标运算方式 2.2 向量运算方式 2.3 叉乘的用途 二.Bounding Box 三.重心坐标 四.z-buffer 五.总结 ...
- 如何创建一个Maven项目(eclipse版本)
1 Maven概念 Maven是一个构建项目和管理项目依赖的工具 2 Maven运行原理 这里需要引入两个词汇,叫 本地仓库.中央仓库 本地仓库:就字面意思,存储在自己电脑上的文件夹(需要自己手动创建 ...