apiVersion: apps/v1
kind: Deployment
metadata:
  name: mongodb
  labels:
    app: db
spec:
  replicas: 1
  selector:
    matchLabels:
      app: db
  template:
    metadata:
      labels:
        app: db
    spec:
      containers:
      - name: mongodb
        image: mongo:3.6
        ports:
        - containerPort: 27017
          name: db-container
        volumeMounts:
          - mountPath: /data/db
            name: mongo-storage
      volumes:
       - name: mongo-storage
         emptyDir: {} # wright now its empty dir later this would be PV
 