apiVersion: apps/v1
kind: Deployment
metadata:
  name: nginx
  namespace: grav
  labels:
    app: nginx
spec:
  replicas: 1
  selector:
    matchLabels:
      app: nginx
  template:
    metadata:
      labels:
        app: nginx
    spec:
      containers:
      - name: nginx
        image: nginx:latest
        ports:
        - containerPort: 80
        volumeMounts:
        - name: nginx-conf
          mountPath: "/etc/nginx/conf.d"
          readOnly: true
        - name: nginx-html
          mountPath: "/usr/share/nginx/html"
          readOnly: true
      volumes:
        - name: nginx-conf
          configMap:
            name: nginx-conf
        - name: nginx-html
          configMap:
            name: nginx-html