demo icon indicating copy to clipboard operation
demo copied to clipboard

Q: How to properly mount fileshare with local(docker-desktop) kubernetes

Open AvinashRamireddy31 opened this issue 3 years ago • 3 comments

Hi,

My projects involves azure fileshare integration. It is working fine in AKS cluster. I would like to replicate the same in local environment for developers using docker-desktop with kubernetes enabled but fileshare is currently is not working because it is provisioned from azure.

I tried https://github.com/andyzhangx/demo/tree/master/linux/azurefile with static provisioning because I already have fileshare. 1.Created azure-secret with storage name and key. 2.Then edited nginx-pod-azurefile-static.yaml file with my sharename. This is throwing ERROR ".......bad option; for several filesystems (e.g. nfs, cifs) you might need a /sbin/mount. helper program."

How would I link my local setup with azure fileshare for my pod deployment? I am feeling that I have to change something in mount options.

FYI: I am running docker-desktop on windows machine with WSL2 enabled

AvinashRamireddy31 avatar Feb 01 '22 15:02 AvinashRamireddy31

I think first you should make sure mount -t cifs ... works on your local env, it requires cifs-utils package

andyzhangx avatar Feb 02 '22 03:02 andyzhangx

Yes, I am trying to mount using cifs-utils. Found really interesting article on that.

But problem is I need to install cifs-utils inside docker-dekstop kubernetes node (shell). I tried to node shell using Lens and getting below error.

image

Looks like it's root/sudo previleges issue. I am not sure what command I should use to node exec with privileges. Lens didn't provide how it's _exec_ing into the node.

So how would I exec into the node and install cifs-utils in docker-desktop kubernetes?

AvinashRamireddy31 avatar Feb 02 '22 07:02 AvinashRamireddy31

I am not familiar with docker-desktop kubernetes

andyzhangx avatar Feb 02 '22 12:02 andyzhangx