apiVersion: apps/v1
kind: Deployment
metadata:
  name: nginx
  namespace: dev
  labels:
    app: nginx
spec:
  replicas: 2
  selector:
    matchLabels:
      app: nginx
  template:
    metadata:
      labels:
        app: nginx
    spec:
      containers:
        - name: nginx
          image: nginx:1.15-alpine
          ports:
            - containerPort: 80
          volumeMounts:
            - name: config-volume
              mountPath: /etc/nginx
            - name: ssl-volume
              mountPath: /etc/nginx
      volumes:
        - name: config-volume
          configMap:
            name: nginx-config
        - name: ssl-volume
          configMap:
            name: ssl-cert
