Skip to content

Instantly share code, notes, and snippets.

@roulette6
Created October 2, 2023 16:20
Show Gist options
  • Save roulette6/ec3281005e5818e40a672af7fcaac10b to your computer and use it in GitHub Desktop.
Save roulette6/ec3281005e5818e40a672af7fcaac10b to your computer and use it in GitHub Desktop.
k3s-nfs

Provisioner

$ kubectl get storageclasses
NAME                   PROVISIONER                                         RECLAIMPOLICY   VOLUMEBINDINGMODE      ALLOWVOLUMEEXPANSION   AGE
local-path (default)   rancher.io/local-path                               Delete          WaitForFirstConsumer   false                  4d18h
nfs                    cluster.local/nfs-nfs-subdir-external-provisioner   Delete          Immediate              true                   97m

PV (not associated with the storage class)

$ kubectl get PersistentVolume
NAME          CAPACITY   ACCESS MODES   RECLAIM POLICY   STATUS      CLAIM   STORAGECLASS   REASON   AGE
pv-nfs-data   2Gi        RWX            Retain           Available                                   171m

PVC meant for the PV I created never gets bound

kubectl get PersistentVolumeClaim
NAME           STATUS    VOLUME   CAPACITY   ACCESS MODES   STORAGECLASS   AGE
pvc-nfs-data   Pending                                      local-path     80m

PVCs for the storage class gets bound no problem

$ kubectl get PersistentVolumeClaim
NAME           STATUS    VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS   AGE
nfsclaim1      Bound     pvc-9cc1f4a5-e5a7-4402-8aa7-b2ae92fe98eb   100Mi      RWO            nfs            14s
nfsclaim2      Bound     pvc-8b1c5ba7-f9e8-495b-bcaf-497c1c9befd3   100Mi      RWO            nfs            14s
pvc-nfs-data   Pending                                                                        local-path     82m
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment