---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: proxy
  labels:
    app: my-proxy
spec:
  replicas: 2
  selector:
    matchLabels:
      app: my-proxy
  template:
    metadata:
      labels:
       app: my-proxy
    spec:
      containers:
      - name: nginx
        image: nginx:latest
        imagePullPolicy: "Always"
        ports:
        - containerPort: 80
        volumeMounts:
        - name: config
          readOnly: true
          mountPath: /etc/nginx/conf.d/
      volumes:
      - name: config
        configMap:
          name: nginx-conf
          items:
           - key: proxy.conf
             path: proxy.conf
