TP-IaC-Kubernetes/exemples/simple-nfsserver.yaml

36 lines
597 B
YAML

kind: Service
apiVersion: v1
metadata:
name: nfs-service
spec:
selector:
role: nfs
ports:
# Open the ports required by the NFS server
# Port 2049 for TCP
- name: tcp-2049
port: 2049
protocol: TCP
# Port 111 for UDP
- name: udp-111
port: 111
type: NodeIP
---
kind: Pod
apiVersion: v1
metadata:
name: nfs-server
labels:
role: nfs
spec:
containers:
- name: nfs-server
image: cpuguy83/nfs-server
securityContext:
privileged: true
args:
# Pass the paths to share to the Docker image
- /exports