Skip to main content

nfs provisioner

ben.wangzLess than 1 minute

nfs provisioner

prepare

  1. k8s is ready
  2. argocd is ready and logged in
  3. nfsv4 server is ready
    • nfs server: nfs.services.geekcity.tech

installation

  1. prepare nfs-provisioner.yaml
    • apiVersion: argoproj.io/v1alpha1
      kind: Application
      metadata:
        name: nfs-provisioner
      spec:
        syncPolicy:
          syncOptions:
          - CreateNamespace=true
        project: default
        source:
          repoURL: https://kubernetes-sigs.github.io/nfs-subdir-external-provisioner
          chart: nfs-subdir-external-provisioner
          targetRevision: 4.0.18
          helm:
            releaseName: nfs-provisioner
            values: |
              image:
                repository: registry.k8s.io/sig-storage/nfs-subdir-external-provisioner
                pullPolicy: IfNotPresent
              nfs:
                server: nfs.services.geekcity.tech
                path: /
                mountOptions:
              storageClass:
                create: true
                defaultClass: true
                name: nfs-external
        destination:
          server: https://kubernetes.default.svc
          namespace: basic-components
      
      
  2. apply to k8s
    • kubectl -n argocd apply -f nfs-provisioner.yaml
      
  3. sync by argocd
    • argocd app sync argocd/nfs-provisioner
      
  4. check storage class
    • kubectl get sc
      

references

  • https://github.com/kubernetes-sigs/nfs-subdir-external-provisioner
  • https://github.com/kubernetes-sigs/nfs-subdir-external-provisioner/blob/master/charts/nfs-subdir-external-provisioner/README.md