...
In this example will walk through creating a NFS server instance, that exports storage that is backed by the default StorageClass for StorageClass for the environment you happen to be running in. In some environments, this could be a host path, in others it could be a cloud provider virtual disk. Either way, this example requires a default StorageClass to StorageClass to exist.
So let's create a simple StorageClass (remember to activate the plugin --enable-admission-plugins=DefaultStorageClass in kube-apiserver.yaml), which will act as the default
| Code Block | ||||
|---|---|---|---|---|
| ||||
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: local-storage
annotations:
storageclass.kubernetes.io/is-default-class: "true"
provisioner: kubernetes.io/no-provisioner
volumeBindingMode: WaitForFirstConsumer |
Create and Initialize NFS Server
...