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