apiVersion: apps/v1
kind: Deployment
metadata:
  name: nginx-deployment
spec:
  selector:
    matchLabels:
      app: nginx
  replicas: 1 
  template:    
    spec:
      containers:
      - name: nginx
        image: nginx:1.19.4-alpine
        ports:
        - containerPort: 80
        volumeMounts:
          - name: html-files
            readOnly: true
            mountPath: /usr/share/nginx/html
      volumes:
        - name: html-files
          configMap:
            name: nginx-configmap
            items:
              - key: index.html
                path: index.html