mount error(13): Permission denied - In docker/kubernetes mount error(13): Permission denied - In docker/kubernetes kubernetes kubernetes

mount error(13): Permission denied - In docker/kubernetes


I had the same issue. Mount worked on server itself, in running the images as docker container but not in running the images as kubernetes deployment. In my case it helped to add a security context to the deployment with privileges and some linux capabilities:

securityContext:        capabilities:          add:            - SYS_ADMIN            - DAC_READ_SEARCH            - NET_BIND_SERVICE        privileged: true


The right approach tends to be to provide appropriate storage setup outside your container, rather than trying to mount things in your container. In the specific case of Kubernetes this means setting up appropriate Volumes and then mounting them in your pod spec.

There's not an out-of-the-box SMB/CIFS Volume driver, but it looks like Microsoft publishes Kubernetes storage plugins that can help.