Skip to content

Commit ae1b082

Browse files
refactor(examples): add deployment example for an nfs server with kerberos auth
1 parent 8a474ca commit ae1b082

File tree

1 file changed

+82
-0
lines changed

1 file changed

+82
-0
lines changed
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
---
2+
kind: Service
3+
apiVersion: v1
4+
metadata:
5+
name: nfs-krb-server
6+
namespace: default
7+
labels:
8+
app: nfs-krb-server
9+
spec:
10+
type: ClusterIP # use "LoadBalancer" to get a public ip
11+
selector:
12+
app: nfs-krb-server
13+
ports:
14+
- name: tcp-2049
15+
port: 2049
16+
protocol: TCP
17+
- name: udp-111
18+
port: 111
19+
protocol: UDP
20+
- name: tcp-88
21+
port: 88
22+
protocol: TCP
23+
- name: tcp-749
24+
port: 749
25+
protocol: TCP
26+
---
27+
kind: Deployment
28+
apiVersion: apps/v1
29+
metadata:
30+
name: nfs-krb-server
31+
namespace: default
32+
spec:
33+
replicas: 1
34+
selector:
35+
matchLabels:
36+
app: nfs-krb-server
37+
template:
38+
metadata:
39+
name: nfs-krb-server
40+
labels:
41+
app: nfs-krb-server
42+
spec:
43+
nodeSelector:
44+
"kubernetes.io/os": linux
45+
containers:
46+
- name: nfs-krb-server
47+
image: docker.io/thealmightydrawingtablet/nfs-krb:alpine
48+
env:
49+
- name: SHARED_DIRECTORY
50+
value: "/srv/shared"
51+
- name: NFS_KRB_REALM
52+
value: NFS-KRB-SERVER.DEFAULT.SVC.CLUSTER.LOCAL
53+
- name: NFS_KRB_PRINC
54+
value: nfs/nfs-krb-server.default.svc.cluster.local
55+
- name: NFS_KRB_PWD
56+
valueFrom:
57+
secretKeyRef:
58+
name: krb-pwd
59+
key: value
60+
volumeMounts:
61+
- mountPath: /srv/shared
62+
name: nfs-vol
63+
securityContext:
64+
privileged: true
65+
ports:
66+
- name: tcp-2049
67+
containerPort: 2049
68+
protocol: TCP
69+
- name: udp-111
70+
containerPort: 111
71+
protocol: UDP
72+
- name: tcp-88
73+
containerPort: 88
74+
protocol: TCP
75+
- name: tcp-749
76+
containerPort: 749
77+
protocol: TCP
78+
volumes:
79+
- name: nfs-vol
80+
hostPath:
81+
path: /srv/nfs-krb-vol # modify this to specify another path to store nfs share data
82+
type: DirectoryOrCreate

0 commit comments

Comments
 (0)