apiVersion: apps/v1
kind: Deployment
metadata:
  annotations:
    kompose.cmd: kompose convert
    kompose.version: 1.22.0 (955b78124)
  labels:
    io.kompose.service: mongo
  name: mongo
spec:
  replicas: 1
  selector:
    matchLabels:
      io.kompose.service: mongo
  strategy:
    type: Recreate
  template:
    metadata:
      annotations:
        kompose.cmd: kompose convert
        kompose.version: 1.22.0 (955b78124)
      labels:
        io.kompose.service: mongo
    spec:
      containers:
        - image: mongo:latest
          name: mongo
          ports:
            - containerPort: 27017
          resources: { }
          volumeMounts:
            - mountPath: /data/db
              name: mongo-claim0
            # 挂载配置文件
      #            - mountPath: /etc/mongod.conf
      #              name: mongo-config
      #              subPath: mongod.conf
      restartPolicy: Always
      volumes:
        - name: mongo-claim0
          persistentVolumeClaim:
            claimName: mongo-claim0
#        - name: mongo-config
#          configMap:
#            name: mongo-config
#            items:
#              - key: master.conf
#                path: mongod.conf
