43 lines
1014 B
YAML
43 lines
1014 B
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: nfs-server
|
|
namespace: nfs-provisioner
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: nfs-server
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: nfs-server
|
|
spec:
|
|
hostNetwork: true
|
|
containers:
|
|
- name: nfs-server
|
|
image: itsthenetwork/nfs-server-alpine:latest
|
|
ports:
|
|
- name: nfs
|
|
containerPort: 2049
|
|
protocol: TCP
|
|
securityContext:
|
|
privileged: true
|
|
env:
|
|
- name: SHARED_DIRECTORY
|
|
value: /nfsshare
|
|
volumeMounts:
|
|
- name: nfs-data
|
|
mountPath: /nfsshare
|
|
volumes:
|
|
- name: nfs-data
|
|
hostPath:
|
|
path: /mnt/storage/k8s/nfsshare
|
|
type: Directory
|
|
tolerations:
|
|
- key: "storage"
|
|
operator: "Equal"
|
|
value: "only"
|
|
effect: "NoSchedule"
|
|
nodeSelector:
|
|
kubernetes.io/hostname: niflheim |