apiVersion: v1
kind: Pod
metadata:
  labels:
    app: nginx
  name: nginx
spec:
  containers:
  - image: nginx
    name: nginx
    ports:
    - containerPort: 80
    volumeMounts:
    - mountPath: /etc/nginx/conf.d # mount nginx-conf volume to /etc/nginx/conf.d
      readOnly: true
      name: nginx-conf
    - mountPath: /usr/share/nginx/html/
      readOnly: true
      name: html-conf
  volumes:
  - name: nginx-conf
    configMap:
      name: nginx-conf # place ConfigMap `nginx-conf` on /etc/nginx/conf.d/default.conf file
      items:
        - key: nginx.conf
          path: default.conf
  - name: html-conf
    configMap:
      name: html-conf 
      items:
        - key: html.conf
          path: index.html
