Built-in Storageclass persistent volume that can be used in Own K8s clusters(VMs) - not AKS

Ibrahim, Uvais 1 Reputation point
2022-04-07T10:43:38.263+00:00

We have a self managed Kubernetes cluster which is created on top of Azure VMs. In a self managed Kubernetes cluster, can we use the dynamically created Azure disk PVs which are using the built-in storage classes?.

In the deployment, we have a PVC section where the storageclass is given as the above mentioned Azure built-in storage class. As soon as the deployment happens, the PVs are getting created. But the pods are not getting scheduled saying 2 node(s) had volume node affinity conflict.

As per my assumption, what happens is, when the PVs are created it gets a node affinity section with PV's manifest. But the intended nodes where the pods are destined to get scheduled are not having those labels and hence the pods are getting failed.

Can you please provide a solution to use the built-in storageclass PVs to attach with self managed (not AKS) kubernetes clusters pods?

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,932 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. vipullag-MSFT 25,441 Reputation points
    2022-04-11T06:13:14.253+00:00

    @Ibrahim, Uvais

    Welcome to Microsoft Q&A Platform, thanks for posting your query here.

    This is supported with deployments of CSI drivers, e.g. follow the docs here.

    You could set volumeBindingMode: WaitForFirstConsumer in Azure disk storage class, the pods would be scheduled to the node first, and then disk PV would be created with the matching volume node affinity.

    Hope that helps.
    Please 'Accept as answer' if it helped, so that it can help others in the community looking for help on similar topics.

    0 comments No comments