Mount Azure Blob Storage in Kubernetes POD

6.8k views Asked by At

There is a way to mount azure blob storage account on a kubernetes pod.

my pod running in kubernetes need to consume files present in blob storage.

i tried : https://learn.microsoft.com/en-us/azure/storage/blobs/storage-how-to-mount-container-linux

# rpm -qa | grep blobfuse
blobfuse-1.3.6-1.el7.x86_64
[]# blobfuse /home/test/mycontainer --tmp-path=/home/test/blobfusetmp --config-file=/home/test/fuse_connection.cfg -o attr_timeout=240 -o entry_timeout=240 -o negative_timeout=120
fuse: device not found, try 'modprobe fuse' first
[]# modprobe fuse
modprobe: ERROR: could not insert 'fuse': Cannot allocate memory

Thanks Satyam

1

There are 1 answers

0
Saswata Chakravarty On

You would need to create a privileged container to be able to use fuse. As a workaround, you can perform the fuse mount in a sidecar container that is privileged, and keep the main container as regular- refer to https://github.com/kubernetes/kubernetes/issues/92114#issuecomment-687104831 for an example.

Alternatively, you can try the blob csi driver https://github.com/kubernetes-sigs/blob-csi-driver .