apiVersion: v1
kind: ReplicationController
metadata:
   labels:
     name: mongo
   name: mongo-controller
spec:
  replicas: 1
  template:
    metadata:
      labels:
        name: mongo
    spec:
      containers:
        - name: mongo
          image: mongo
          ports:
          - name: mongo
            containerPort: 27017
            hostPort: 27017
          volumeMounts:
          - name: mongo-storage
            mountPath: /data/db
      volumes:
      - name: mongo-storage
        persistentVolumeClaim:
          claimName: data-claim


