apiVersion: apps/v1
kind: Deployment
metadata:
  name: nginx
spec:
  replicas: 2
  selector:
    matchLabels:
      app: nginx
  template:
    metadata:
      name: nginx
      labels:
        app: nginx
    spec:
      shareProcessNamespace: true
      volumes:
        - name: nginx
          configMap:
            name: nginx
        - name: nginx-html
          configMap:
            name: nginx-html
      containers:
        - name: nginx
          image: nginx:1.10-alpine  # = :stable-alpine as of 8/23/2016
          ports:
            - name: http
              containerPort: 80
            - name: https
              containerPort: 443
          volumeMounts:
            - name: nginx
              mountPath: /etc/nginx
              readOnly: true
            - name: nginx-html
              mountPath: /usr/share/nginx/html
              readOnly: true
        - name: nginx-reloader
          image: bartsmykla/nginx-reloader
          env:
            - name: WATCH_NGINX_CONF_PATH
              value: /etc/nginx
          volumeMounts:
            - name: nginx
              mountPath: /etc/nginx
              readOnly: true