Jump to main content

Addon: NFS Server Provisioner

Homepage: https://kubernetes-sigs.github.io/nfs-ganesha-server-and-external-provisioner/
Supported arch: amd64

Enabling this addon will add NFS Ganesha Server and Provisioner to MicroK8s, running as a pod. The components will be installed and connected together. Unlike the standard hostpath-storage, this addon can provide storage to any node which is part of the cluster.

To enable the addon first make sure you have installed the appropriate nfs package on all MicroK8s nodes to allow Pods with NFS mounts (eg sudo apt install -y nfs-common). Afterwards you can call:

microk8s enable nfs

To enable the addon for a specific node, you can run:

microk8s enable nfs -n <NODENAME>

The created storage class, nfs, can be used to create a pvc using the following YAML :

kind: PersistentVolumeClaim
apiVersion: v1
  name: pvc-nfs
    vol: pvc-nfs
  namespace: default
  storageClassName: "nfs"
    - ReadWriteMany
      storage: 1Gi

…editing any details (such as the amount of storage) as needed.

By default the volumes will be stored on a single node utilizing hostPath storage under /var/snap/microk8s/common/nfs-storage.

The addon can be disabled at any time with the command:

microk8s disable nfs

Last updated 1 year, 8 months ago. Help improve this document in the forum.