apiVersion: apps/v1 kind: Deployment metadata: name: nginx2 spec: selector: matchLabels: app: nginx2 replicas: 3 template: metadata: labels: app: nginx2 spec: containers: - name: nginx image: nginx:alpine ports: - containerPort: 80 volumeMounts: - name: nginx-html-volume mountPath: /usr/share/nginx/html volumes: - name: nginx-html-volume configMap: name: nginx-html-config2 items: - key: index.html path: index.html