kind: Deployment
apiVersion: apps/v1
metadata:
  name: nfs-client-provisioner
  namespace: kube-system
spec:
  selector:
    matchLabels:
      app: nfs-client-provisioner
  replicas: 1
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        app: nfs-client-provisioner
    spec:
      serviceAccountName: nfs-client-provisioner
      containers:
        - name: nfs-client-provisioner
          image: registry.cn-beijing.aliyuncs.com/gisuni/nfs-subdir-external-provisioner:v4.0.2
          volumeMounts:
            - name: nfs-client-root
              mountPath: /persistentvolumes
          env:
            - name: PROVISIONER_NAME
              value: k8s-sigs.io/nfs-subdir-external-provisioner
            - name: NFS_SERVER
              value: 192.168.1.10 # nfs server ip
            - name: NFS_PATH
              value: /nfs/path  # nfs path
          resources:
            requests:
              cpu: 200m
              memory: 500Mi
            limits:
              cpu: 200m
              memory: 500Mi
      volumes:
        - name: nfs-client-root
          nfs:
            server: 192.168.1.10
            path: /nfs/path
