The nfs server pod creates a privileged container, so if you are using a Salt based KUBERNETES_PROVIDER (**gce**, **vagrant**, **aws**), you have to enable the ability to create privileged containers by API.
The server exports `/mnt/data` directory as `/` (fsid=0). The
directory contains dummy `index.html`. Wait until the pod is running
by checking `kubectl get pods -lrole=nfs-server`.
```sh
### Create the NFS claim
# At the root of Kubernetes source code
$ vi cluster/saltbase/pillar/privilege.sls
# If true, allow privileged containers to be created by API
The [NFS busybox controller](nfs-busybox-rc.yaml) uses a simple script to
allow_privileged: true
generate data written to the NFS server we just started. First, you'll need to
find the cluster IP of the server:
```console
$ kubectl describe services nfs-server
```
```
For other non-salt based provider, you can set `--allow-privileged=true` for both api-server and kubelet, and then restart these components.
Replace the invalid IP in the [nfs PV](nfs-pv.yaml). (In the future,
we'll be able to tie these together using the service names, but for
now, you have to hardcode the IP.)
Rebuild the Kubernetes and spin up a cluster using your preferred KUBERNETES_PROVIDER.
Create the the [persistent volume](../../docs/user-guide/persistent-volumes.md)
and the persistent volume claim for your NFS server. The persistent volume and
claim gives us an indirection that allow multiple pods to refer to the NFS
server using a symbolic name rather than the hardcoded server address.
### NFS server part
```console
$ kubectl create -f examples/nfs/nfs-pv.yaml
$ kubectl create -f examples/nfs/nfs-pvc.yaml
```
Define [NFS server pod](nfs-server-pod.yaml) and
## Setup the fake backend
[NFS service](nfs-server-service.yaml):
$ kubectl create -f nfs-server-pod.yaml
The [NFS busybox controller](nfs-busybox-rc.yaml) updates `index.html` on the
$ kubectl create -f nfs-server-service.yaml
NFS server every 10 seconds. Let's start that now:
The server exports `/mnt/data` directory as `/` (fsid=0). The directory contains
```console
dummy `index.html`. Wait until the pod is running!