Skip to content

Commit a6edadd

Browse files
authored
add nfs storageClass example (#28941)
* add nfs example * --amend
1 parent d078b42 commit a6edadd

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

content/en/docs/concepts/storage/storage-classes.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ for provisioning PVs. This field must be specified.
7676
| Glusterfs | ✓ | [Glusterfs](#glusterfs) |
7777
| iSCSI | - | - |
7878
| Quobyte | ✓ | [Quobyte](#quobyte) |
79-
| NFS | - | - |
79+
| NFS | - | [NFS](#nfs) |
8080
| RBD | ✓ | [Ceph RBD](#ceph-rbd) |
8181
| VsphereVolume | ✓ | [vSphere](#vsphere) |
8282
| PortworxVolume | ✓ | [Portworx Volume](#portworx-volume) |
@@ -423,6 +423,29 @@ parameters:
423423
`gluster-dynamic-<claimname>`. The dynamic endpoint and service are automatically
424424
deleted when the persistent volume claim is deleted.
425425

426+
### NFS
427+
428+
```yaml
429+
apiVersion: storage.k8s.io/v1
430+
kind: StorageClass
431+
metadata:
432+
name: example-nfs
433+
provisioner: example.com/external-nfs
434+
parameters:
435+
server: nfs-server.example.com
436+
path: /share
437+
readOnly: false
438+
```
439+
440+
* `server`: Server is the hostname or IP address of the NFS server.
441+
* `path`: Path that is exported by the NFS server.
442+
* `readOnly`: A flag indicating whether the storage will be mounted as read only (default false).
443+
444+
Kubernetes doesn't include an internal NFS provisioner. You need to use an external provisioner to create a StorageClass for NFS.
445+
Here are some examples:
446+
* [NFS Ganesha server and external provisioner](https://github.com/kubernetes-sigs/nfs-ganesha-server-and-external-provisioner)
447+
* [NFS subdir external provisioner](https://github.com/kubernetes-sigs/nfs-subdir-external-provisioner)
448+
426449
### OpenStack Cinder
427450

428451
```yaml

0 commit comments

Comments
 (0)