Can I access azure disk from multiple k8s nodes?

Can Capraz 1 Reputation point
2022-07-28T17:35:20.737+00:00

Hi,

We have a repo about 150gb in size, and we're using the files in our application. The file size we use for a single operation is around 4-5gb.
Our application is on Azure Kubernetes Service.

Until now, we were putting these files on azure disk. We were creating an azure disk by creating pvc on AKS, and syncing the repo here using a syncronizer app we developed. We were mounting this PVC to our pods as a volume and we could access the files quickly.

However, since the azure disk does not support ReadWriteMany, we have to put all our pods on one node. Thus, we cannot use node autoscaling. Here we want to be able to use ReadOnlyMany or ReadWriteMany.
We tried to use AzureFile or AzureBlob, and our access to files slows down considerably.
We tried to use the shared disk, and we saw that shared disks cannot be mounted as Filesystem on AKS, they have to be mounted as Block, which does make sense for us.

What is your suggestion about this? Do you have an innovation that we missed, or a method that we missed?

Azure Kubernetes Service (AKS)
Azure Kubernetes Service (AKS)
An Azure service that provides serverless Kubernetes, an integrated continuous integration and continuous delivery experience, and enterprise-grade security and governance.
1,869 questions
Azure Disk Storage
Azure Disk Storage
A high-performance, durable block storage designed to be used with Azure Virtual Machines and Azure VMware Solution.
573 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Silvia Wibowo 3,011 Reputation points Microsoft Employee
    2023-01-11T19:37:33.8833333+00:00

    Hi @Can Capraz , sorry for the delay in response.

    I understand that you are trying to provide a shared file storage for multiple AKS nodes. Once you require multiple writers into the same filesystem, there are methodologies in place to ensure integrity of the file to prevent corruption, which introduce performance penalty compared to single writer. Your application can provide the integrity fencing similar to cluster application like Oracle RAC, but it needs lower level access, hence the mounting as block.

    Another idea I can think of: if you have the liberty of changing the application, you may consider using other storage mechanism, not a file. For example NoSQL database or Redis cache.