apiVersion: apps/v1
kind: Deployment # Creating deployment for openebs-nfs-provisoner
metadata:
 name: openebs-nfs-provisioner
spec:
 selector:
   matchLabels:
     app: openebs-nfs-provisioner
 replicas: 1
 strategy:
   type: Recreate
 template:
   metadata:
     labels:
       app: openebs-nfs-provisioner
   spec:
     serviceAccount: openebs-nfs-provisioner
     containers:
       - name: openebs-nfs-provisioner
         image: quay.io/kubernetes_incubator/nfs-provisioner:latest
         ports:
           - name: nfs
             containerPort: 2049
           - name: mountd
             containerPort: 20048
           - name: rpcbind
             containerPort: 111
           - name: rpcbind-udp
             containerPort: 111
             protocol: UDP
         securityContext:
           capabilities:
             add:
               - DAC_READ_SEARCH
               - SYS_RESOURCE
         args:
           - "-provisioner=openebs.io/nfs" # Name of the provisioner
         env:
           - name: POD_IP
             valueFrom:
               fieldRef:
                 fieldPath: status.podIP
           - name: SERVICE_NAME
             value: openebs-nfs-provisioner
           - name: POD_NAMESPACE
             valueFrom:
               fieldRef:
                 fieldPath: metadata.namespace
         imagePullPolicy: "IfNotPresent"
         volumeMounts:
           - name: export-volume
             mountPath: /export
     volumes:
     - name: export-volume
       persistentVolumeClaim:
         claimName: openebspvc
