mongodb
# PersistentVolume
apiVersion: v1
kind: PersistentVolume
metadata:
name: birenchong-devops-mongodb-data-pv
namespace: birenchong-devops
spec:
capacity:
storage: 10Gi
volumeMode: Filesystem
accessModes:
- ReadWriteMany
persistentVolumeReclaimPolicy: Retain
storageClassName: efs-sc-static
csi:
driver: efs.csi.aws.com
volumeHandle: fs-0xxxxxxxxxxxxx3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# PersistentVolumeClaim
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: birenchong-devops-mongodb-data-pvc
namespace: birenchong-devops
spec:
accessModes:
- ReadWriteMany
storageClassName: efs-sc-static
resources:
requests:
storage: 10Gi
1
2
3
4
5
6
7
8
9
10
11
12
13
2
3
4
5
6
7
8
9
10
11
12
13
# StatefulSet
kind: StatefulSet
apiVersion: apps/v1
metadata:
name: birenchong-devops-tool-mongodb-v1
namespace: birenchong-devops
labels:
app: birenchong-devops-tool-mongodb
version: v1
annotations:
kubesphere.io/creator: admin
spec:
replicas: 1
selector:
matchLabels:
app: birenchong-devops-tool-mongodb
version: v1
template:
metadata:
creationTimestamp: null
labels:
app: birenchong-devops-tool-mongodb
version: v1
annotations:
logging.kubesphere.io/logsidecar-config: '{}'
spec:
volumes:
- name: volume-qjy87y
persistentVolumeClaim:
claimName: birenchong-devops-mongodb-data-pvc
containers:
- name: devops-mongodb
image: 'mongo:latest'
ports:
- name: tcp-27017
containerPort: 27017
protocol: TCP
resources: {}
volumeMounts:
- name: volume-qjy87y
mountPath: /data/db
subPath: mongodb/db
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
imagePullPolicy: IfNotPresent
restartPolicy: Always
terminationGracePeriodSeconds: 30
dnsPolicy: ClusterFirst
nodeSelector:
env: devops
serviceAccountName: default
serviceAccount: default
securityContext: {}
schedulerName: default-scheduler
serviceName: birenchong-devops-tool-mongodb
podManagementPolicy: OrderedReady
updateStrategy:
type: RollingUpdate
rollingUpdate:
partition: 0
revisionHistoryLimit: 10
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Service-ClusterIP
kind: Service
apiVersion: v1
metadata:
name: birenchong-devops-tool-mongodb
namespace: birenchong-devops
labels:
app: birenchong-devops-tool-mongodb
version: v1
annotations:
kubesphere.io/creator: admin
kubesphere.io/serviceType: statefulservice
spec:
ports:
- name: tcp-27017
protocol: TCP
port: 27017
targetPort: 27017
selector:
app: birenchong-devops-tool-mongodb
clusterIP: None
clusterIPs:
- None
type: ClusterIP
sessionAffinity: None
ipFamilies:
- IPv4
ipFamilyPolicy: SingleStack
internalTrafficPolicy: Cluster
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
Last Updated: 2023/11/08, 14:45:54