[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的更多相关文章

  1. kubernetes 1.17.2结合ceph13.2.8 实现jenkins部署并用traefik2.1代理

    注:关于ceph.kubernetes集群的部署在此不声明,相信搜到本篇博文,你一定对ceph.kubernetes的部署环节手刃有余. 注:本篇博文牵扯到的技术点有:ceph.kubernetes. ...

  2. kubeasz部署高可用kubernetes1.17.2 并实现traefik2.1.2部署

    模板机操作 # cat /etc/redhat-release CentOS Linux release 7.6.1810 (Core) # uname -a //内核升级到4.4.X以后, 关于如何 ...

  3. kubernetes1.17集群部署

    学习自:https://www.jianshu.com/p/789bc867feaa ###批量配置免秘钥 密码可自行修改 这里的密码是123456 yum  install -y expect ss ...

  4. 在kubernetes1.17.2上结合ceph部署efk

    简绍 应用程序和系统日志可以帮助我们了解集群内部的运行情况,日志对于我们调试问题和监视集群情况也是非常有用的.而且大部分的应用都会有日志记录,对于传统的应用大部分都会写入到本地的日志文件之中.对于容器 ...

  5. K8S(17)二进制的1.15版本部署hpa自动伸缩

    K8S(17)二进制部署的K8S(1.15)部署hpa功能 目录 K8S(17)二进制部署的K8S(1.15)部署hpa功能 零.参考文件: 一.生成metrics-proxy证书 二.修改apise ...

  6. 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 ...

  7. kubernetes 1.17.2 kubeadm部署 证书修改为100年

    [root@hs-k8s-master01 ~]# cd /data/ [root@hs-k8s-master01 data]# ls docker [root@hs-k8s-master01 dat ...

  8. 部署harbor以https模式和k8s对接

    集群时间同步 我们在之前的kubeasz部署高可用kubernetes1.17.2 并实现traefik2.1.2部署篇已经实现了基于chrony的时间同步 [root@bs-k8s-master01 ...

  9. CentOS利用Nginx+Docker部署.netcore应用

    安装docker 官方文档https://docs.docker.com/engine/installation/linux/docker-ce/centos/ [root@sn ~]# yum re ...

随机推荐

  1. CSS Learning Paths

    CSS Learning Paths CSS Expert refs https://developer.mozilla.org/en-US/docs/Web/CSS https://css-tric ...

  2. http methods & restful api methods

    http methods & restful api methods 超文本传输​​协议(HTTP)是用于传输超媒体文档(例如HTML)的应用层协议 https://developer.moz ...

  3. auto skip function args

    auto skip function args https://repl.it/@xgqfrms/auto-skip-function-args "use strict"; /** ...

  4. Google 灭霸 彩蛋

    Google 灭霸 彩蛋 在Google中搜索"灭霸",然后在右侧点击的"无限手套",页面的一些搜索项就会随机性像沙子一样的消失(后面统称沙化效果),特别的炫酷 ...

  5. 算法型稳定币USDN有哪些使用功能

    众所周知,稳定币是基于区块链的支付工具,旨在实现最终用户要求的价格稳定性.有些稳定币利用法定货币作为抵押资产.其他则使用一系列其他非法定类型的抵押资产.还有一些尝试使用算法来实现价格稳定性而根本没有抵 ...

  6. 配置JDK环境及其相关问题

    1.首先找到JDK的安装目录 如果忘记了安装目录在那个地方,可以通过dos命令java -verbose,进行查看 配置jdk环境 新建系统变量JAVA_HOME: 编辑系统变量Path: 新建系统变 ...

  7. Redis基本数据结构之ZSet

    1.1Zset(有序集合) Zset保留了集合不能有重复成员的特性,但不同的是,有序集合中的元素可以排序.但是它和列表使用索引下标作为排序依据不同的是,它给每个元素设置一个分数(score)作为排序的 ...

  8. 解决tui-editor布局错误失效问题(Vue-Element-Admin)

    更新:突然想起来会不会是兼容或者版本问题? 使用tui-editor遇到markdown预览样式错误,也不清楚是不是版本的问题,改了下源码之后效果正常了 打开控制台看到几个类名不对劲,te-edito ...

  9. go mod包管理 加代理下载

    原始go.mod文件 module xxx go 1.14 报错 i/o timeout go mod init workorder go mod init: go.mod already exist ...

  10. 清华大学-成绩排序(排序+解决MLE问题)

    成绩排序 成绩排序 这里需要注意的就是超内存的问题. 解决方法就是通过指针的方式,每次动态开n大小的内存,而不是一开始就分配. #include<bits/stdc++.h> using ...