|
1 | 1 | ## Set up a Samba Server and a deployment to access Samba Server on a Kubernetes cluster |
2 | | -This page will show you how to: |
3 | | - - set up a Samba Server deployment on a Kubernetes cluster |
| 2 | +This page will show you how to set up a Samba Server deployment on a Kubernetes cluster. |
4 | 3 | > file share data is stored on local disk. |
5 | | - - set up a deployment to access Samba Server on a Kubernetes cluster |
6 | 4 |
|
7 | 5 | ### Set up a Samba Server |
8 | | - - Use `kubectl create secret` to create `smbcreds` with SMB username, password |
| 6 | + - Use `kubectl create secret` to create `smbcreds` secret to store Samba Server username, password |
9 | 7 | ```console |
10 | 8 | kubectl create secret generic smbcreds --from-literal username=USERNAME --from-literal password="PASSWORD" |
11 | 9 | ``` |
12 | 10 |
|
13 | | - - Create a Samba Server deployment |
| 11 | + - Option#1. Create a Samba Server deployment on local disk |
14 | 12 | > modify `/smbshare-volume` in deployment to specify different path for smb share data store |
15 | 13 | ```console |
16 | 14 | kubectl create -f https://raw.githubusercontent.com/kubernetes-csi/csi-driver-smb/master/deploy/example/smb-provisioner/smb-server.yaml |
17 | 15 | ``` |
18 | 16 |
|
19 | | -After deployment, a new service `smb-server` is created, file share path is `//smb-server.default.svc.cluster.local/share` |
20 | | - |
21 | | -### Create a deployment to access above Samba Server |
| 17 | + - Option#2. Create a Samba Server deployment on Azure data disk |
22 | 18 | ```console |
23 | | -kubectl create -f https://raw.githubusercontent.com/kubernetes-csi/csi-driver-smb/master/deploy/example/smb-provisioner/pv-smb.yaml |
24 | | -kubectl create -f https://raw.githubusercontent.com/kubernetes-csi/csi-driver-smb/master/deploy/example/pvc-smb-static.yaml |
25 | | -kubectl create -f https://raw.githubusercontent.com/kubernetes-csi/csi-driver-smb/master/deploy/example/deployment.yaml |
| 19 | +kubectl create -f https://raw.githubusercontent.com/kubernetes-csi/csi-driver-smb/master/deploy/example/smb-provisioner/smb-server-azuredisk.yaml |
26 | 20 | ``` |
27 | 21 |
|
28 | | - - Verification |
29 | | -```console |
30 | | -# kubectl exec -it deployment-smb-646c5d579c-5sc6n bash |
31 | | -root@deployment-smb-646c5d579c-5sc6n:/# df -h |
32 | | -Filesystem Size Used Avail Use% Mounted on |
33 | | -... |
34 | | -//smb-server.default.svc.cluster.local/share 97G 21G 76G 22% /mnt/smb |
35 | | -/dev/sda1 97G 21G 76G 22% /etc/hosts |
36 | | -... |
37 | | -``` |
| 22 | +After deployment, a new service `smb-server` is created, file share path is `//smb-server.default.svc.cluster.local/share` |
0 commit comments