k3s/examples/nfs/nfs-web-pod.yaml

26 lines
531 B
YAML

#
# This pod imports nfs-server.default.kube.local:/ into /usr/share/nginx/html
#
apiVersion: v1
kind: Pod
metadata:
name: nfs-web
spec:
containers:
- name: web
image: nginx
ports:
- name: web
containerPort: 80
volumeMounts:
# name must match the volume name below
- name: nfs
mountPath: "/usr/share/nginx/html"
volumes:
- name: nfs
nfs:
# FIXME: use the right hostname
server: nfs-server.default.kube.local
path: "/"