apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: nfs-demo
    role: web-frontend
  name: nfs-web
spec:
  replicas: 2
  selector:
    matchLabels:
      app: nfs-demo
      role: web-frontend
  template:
    metadata:
      labels:
        app: nfs-demo
        role: web-frontend
    spec:
      containers:
      - name: web
        image: nginx
        ports:
          - name: web
            containerPort: 80
        volumeMounts:
            # name must match the volume name below
            - name: rook-nfs-vol
              mountPath: "/usr/share/nginx/html"
      volumes:
      - name: rook-nfs-vol
        persistentVolumeClaim:
          claimName: rook-nfs-pv-claim
