apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    run: test
  name: red
spec:
  replicas: 2
  selector:
    matchLabels:
      run: test
  template:
    metadata:
      labels:
        run: test
    spec:
      containers:
      - image: nginx
        name: nginx
        volumeMounts:
        - mountPath: /usr/share/nginx/html
          name: red
      volumes:
      - name: red
        configMap:
          name: red
