TL;DR

  • 우선 NFS 가 설정되어 있어야 한다.
  • NS 생성 (선택)
kubectl create ns system-nfs
nfs.yaml
nfs:
  server: {{ NFS 서버 엔드포인트}}
  path: {{ NFS 서버의 export path }}
storageClass:
  name: default
  onDelete: retain
  pathPattern: ${.PVC.namespace}/${.PVC.name}
  defaultClass: true
affinity:
  podAntiAffinity:
    requiredDuringSchedulingIgnoredDuringExecution:
      - labelSelector:
          matchExpressions:
            - key: app
              operator: In
              values:
                - default
        topologyKey: kubernetes.io/hostname
  • Helm repo add
helm repo add nfs-subdir-external-provisioner https://kubernetes-sigs.github.io/nfs-subdir-external-provisioner
  • Helm install
helm -n system-nfs upgrade --install nfs nfs-subdir-external-provisioner/nfs-subdir-external-provisioner -f nfs.yaml