Brc's blog
首页
前端
后端
运维
  • 工作笔记
  • 分类
  • 标签
  • 归档
关于

Brc

努力中
首页
前端
后端
运维
  • 工作笔记
  • 分类
  • 标签
  • 归档
关于
  • 工具安装

  • AWS

  • EKS

    • 扩缩容

    • 存储

    • devops

    • test

      • 保密字典
      • redis
      • mysql
      • rabbitmq
      • mongodb
        • PersistentVolume
        • PersistentVolumeClaim
        • StatefulSet
        • Service-ClusterIP
      • consul
      • xxl-job
      • java
    • CICD

    • 问题
  • 其他

  • AWS创建EKS集群
  • 谷歌云创建GKE集群
  • 工作笔记
  • EKS
  • test
Brc
2023-06-11
目录

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

# 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

# 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

# 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
#mongodb
Last Updated: 2023/11/08, 14:45:54
rabbitmq
consul

← rabbitmq consul→

最近更新
01
谷歌云创建GKE集群
07-26
02
ElastiCacheForRedis启用密码
07-26
03
upload-to-gcs
06-29
更多文章>
Theme by Vdoing | Copyright © 2021-2024 Brc | MIT License | 浙ICP备19031881号-4
  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式