apiVersion: apps/v1
kind: StatefulSet
metadata:
        name: mongo
spec:
        selector:
          matchLabels:
            app: mongo
        serviceName: mongo
        replicas: 3
        template:
          metadata:
            labels:
              app: mongo
          spec:
            terminationGracePeriodSeconds: 10
            containers:
              - name: mongo
                image: mongo
                command:
                  - mongod
                  - "--bind_ip_all"
                  - "--replSet"
                  - rs0
                ports:
                  - containerPort: 27017
                volumeMounts:
                  - name: volume-mongo
                    mountPath: /data/db
        volumeClaimTemplates:
          - metadata:
              name: volume-mongo
            spec:
              storageClassName: mongo-local-storage
              accessModes:
                - ReadWriteOnce
              resources:
                requests:
                  storage: 90Mi
