apiVersion: extensions/v1beta1
kind: ReplicaSet
metadata:
  labels:
    name: mongo
  name: mongo
spec:
  replicas: 3
  template:
    metadata:
      labels:
        name: mongo
    spec:
      containers:
      - image: mongo
        name: mongo
        args:
          - --replSet
          - rs0
        ports:
        - name: mongo
          containerPort: 27017
        volumeMounts:
          - name: mongo-db
            mountPath: /data/db
      volumes:
        - name: mongo-db
          persistentVolumeClaim:
            claimName: mongo-storage
