apiVersion: apps/v1
kind: Deployment
metadata:
 name: nginx
spec:
 selector:
  matchLabels:
   app: nginx
   version: v1
 template:
  metadata:
   labels:
    app: nginx
    version: v1
  spec:
   containers:
   - name: nginx
     image: nginx:1.16-alpine
     ports:
     - containerPort: 80

     volumeMounts:
     - mountPath: /etc/nginx/conf.d
       name: nginx-conf
       readOnly: true

   volumes:
   - name: nginx-conf
     configMap:
      name: nginx-conf
      items:
       - key: nginx.conf
         path: nginx.conf