apiVersion: apps/v1
kind: Deployment
metadata:
  name: deploy-with-nfspvc
spec:
  replicas: 2
  strategy:
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 1
    type: RollingUpdate
  selector:
    matchLabels:
      app: pod-with-nfspvc
  template:
    metadata:
      labels: 
        app: pod-with-nfspvc
    spec:
      containers:
      - name: nginx
        image: nginx:1.18
        volumeMounts:
        - name: mypvc
          mountPath: /opt
      volumes:
      - name: mypvc
        persistentVolumeClaim:
          claimName: nfspvc001
      
      
    