apiVersion: v1
kind: ReplicationController
metadata:
  labels:
    name: mongodb
  name: mongodb-controller
spec:
  replicas: 1
  template:
    metadata:
      labels:
        name: mongodb
    spec:
      containers:
      - image: mongo:3.6
        name: mongodb
        ports:
        - name: mongo
          containerPort: 27017
          hostPort: 27017
        volumeMounts:
            - name: mongodb-persistent-storage
              mountPath: /data/db
      volumes:
        - name: mongodb-persistent-storage
          hostPath:
                path: /data/storage/mongodb