forked from kubernetes-sigs/azurefile-csi-driver
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsmb-server.yaml
59 lines (59 loc) · 1.44 KB
/
smb-server.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
---
kind: Service
apiVersion: v1
metadata:
name: smb-server
labels:
app: smb-server
spec:
type: ClusterIP # use "LoadBalancer" to get a public ip
selector:
app: smb-server
ports:
- port: 445
name: smb-server
---
kind: Deployment
apiVersion: apps/v1
metadata:
name: smb-server
spec:
replicas: 1
selector:
matchLabels:
app: smb-server
template:
metadata:
name: smb-server
labels:
app: smb-server
spec:
nodeSelector:
"kubernetes.io/os": linux
containers:
- name: smb-server
image: andyzhangx/samba:win-fix
env:
- name: PERMISSIONS
value: "0777"
- name: USERNAME
valueFrom:
secretKeyRef:
name: smbcreds
key: azurestorageaccountname
- name: PASSWORD
valueFrom:
secretKeyRef:
name: smbcreds
key: azurestorageaccountkey
args: ["-u", "$(USERNAME);$(PASSWORD)", "-s", "share;/smbshare/;yes;no;no;all;none", "-p"]
volumeMounts:
- mountPath: /smbshare
name: data-volume
ports:
- containerPort: 445
volumes:
- name: data-volume
hostPath:
path: /home/kubernetes/smbshare-volume # modify this to specify another path to store smb share data
type: DirectoryOrCreate