Prepare a file system persistent volume
Prerequisite
- 
Create an NFS Server. 
- 
Export the path. 
- 
In the example below, the yamlfile uses the NFS server10.10.10.10and the exported path is:/my/nfs/volume/path.
Limitation
CTE for Kubernetes does not support mounting conventionally-protected PVCs and CTE-protected PVCs simultaneously. This could lead to unexpected behavior.
Create a Persistent Storage (PV) YAML file description
The following example explains how to create a persistent storage for CTE for Kubernetes to guard. Find more information on creating Persistent Volumes at:
Note
Replace the dummy entries for path and server with your own working NFS configuration.
nfs-pv.yaml
apiVersion: v1
kind: PersistentVolume
metadata:
    name: nfs-test-pv
spec:
    capacity:
      storage: 1Gi
    accessModes:
    -  ReadWriteMany
    storageClassName: nfs
    persistentVolumeReclaimPolicy: Retain
    mountOptions:
        - hard
    nfs:
        path: /my/nfs/volume/path
        server: 10.10.10.10
Create a Persistent Storage Claim (PVC) YAML file description
nfs-claim.yaml
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
    name: nfs-test-claim
spec:
  storageClassName: nfs
  accessModes:
    - ReadWriteMany
  resources:
    requests:
      storage: 1Gi
Note
The PV name is not referenced in the PVC. This particular claim will claim any PV that matches the requirements.
Apply Persistent Storage YAML files
Type:
kubectl apply -f nfs-pv.yaml
kubectl apply -f nfs-claim.yaml