apiVersion: v1
kind: Pod
metadata:
  name: helloworld-nginx
  labels:
    app: helloworld-nginx
spec:
  containers:
  - name: nginx
    image: nginx:1.11
    ports:
    - containerPort: 80
    volumeMounts:
    - name: config-volume
      mountPath: /etc/nginx/conf.d
  - name: k8s-demo
    image: xuyongzhidocker/demo-app:node-demo-0.0.2
    ports:
    - containerPort: 3001
  volumes:
    - name: config-volume # applied prevously by 'volumeMounts'
      configMap:
        name: nginx-config # created separately and prior to this pod created
        items:
        - key: reverseproxy.conf
          path: reverseproxy.conf

          # nginx-config was created prior to this pod creating. to to that using 'kubectl create configmap nginx-config --from-file=configmap/reverseproxy.conf '