This page will show you how to set up a Samba Server deployment on a Kubernetes cluster.
- Use
kubectl create secret
to createsmbcreds
secret storing Samba Server username, password
kubectl create secret generic smbcreds --from-literal username=USERNAME --from-literal password="PASSWORD"
Note: This example is for development purpose only. Since samba server is sticky to the node it is scheduled on, data would be lost if the pod is rescheduled on another node.
modify
/smbshare-volume
in deployment to specify different path for smb share data store
- Access by Linux node
kubectl create -f https://raw.githubusercontent.com/kubernetes-csi/csi-driver-smb/master/deploy/example/smb-provisioner/smb-server.yaml
- Access by Windows node
kubectl create -f https://raw.githubusercontent.com/kubernetes-csi/csi-driver-smb/master/deploy/example/smb-provisioner/smb-server-lb.yaml
Default network disk in Azure is Azure managed disk and default one in GCE is persistent disk.
kubectl create -f https://raw.githubusercontent.com/kubernetes-csi/csi-driver-smb/master/deploy/example/smb-provisioner/smb-server-networkdisk.yaml
After deployment, a new service smb-server
is created, file share path is //smb-server.default.svc.cluster.local/share