#Kubernetes/#K8S Q: I've been having an issue all this while I haven't quite been able to tackle. How do I properly mount a #Samba/#SMB/#CIFS share in a #Docker container on Kubernetes?
I definitely don't want a method that does any "pass through" outside of the container such as mounting said share on the Kubernetes node then passing it to the container, since that seems quite hacky and the deployment/pod could easily be reassigned to a different node.
The #SMB share could be accessed (ls-ed) directly on the worker node:
sudo ls -alZ /var/lib/kubelet/plugins/kubernetes.io/csi/smb.csi.k8s.io/{volume}/globalmount
-but not on the container itself. The fix is, the worker nodes (with SELinux) needs the boolean, virt_use_samba to be enabled. On the worker node, check if it is indeed disabled:
@irfan Glad you worked it out! The high default level of security (and SELinux in particular) can add some irritating hindrances sometimes, but it’s worth it 🔒
If there are any CIFS/SMB experts floating around, does it seem accurate or absurd that deleting a file in a folder tree has a different effect on the timestamps of the folders "above" it than deleting a folder?
If dir1/dir2/dir3/dir4/hello.txt is the structure, dir1 is "above" dir3.
Weiter geht es mit #Docker for Tuxi. Ich habe in #Portainer eine Volume erstellt, das per #CIFS eine Freigabe meines NAS einbindet.
Diese Freigabe wird im Container auch eingebunden. Das Problem ist, dass ich absolut nichts in diese Freigabe schreiben kann. Selbst ein chmod 777 im Container bringt nichts.
Ich suche mir echt den Wolf, finde aber absolut nichts, was zu einer Lösung führen könnte.
Was muss ich machen, dass ich im Container in das CIFS-Volume schreiben kann? #Frage#FragDieFediverse#FragDasFediverse#Followerpower@askfedi_de