apiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2
kind: Deployment
metadata:
  name: nginx-deployment
spec:
  selector:
    matchLabels:
      app: nginx
  replicas: 1 # tells deployment to run 2 pods matching the template
  template: # create pods using pod definition in this template
    metadata:
      # unlike pod-nginx.yaml, the name is not included in the meta data as a unique name is
      # generated from the deployment name
      labels:
        app: nginx
    spec:
      containers:
      - name: nginx
        image: nginx:1.15.0-alpine
        ports:
        - containerPort: 80
        volumeMounts:
        - mountPath: /usr/share/nginx/html/minikube-easy
          name: minikube-easy
        - mountPath: /etc/nginx/conf.d
          name: nginx-conf
      volumes:
      - name: minikube-easy
        hostPath:
          # directory location on host
          path: /host-home/Developer/projects/minikube-easy
          # this field is optional
          type: DirectoryOrCreate
      - name: nginx-conf
        hostPath:
          # directory location on host
          path: /host-home/Developer/projects/minikube-easy/conf
          # this field is optional
          type: DirectoryOrCreate