How to setup Azure Container Storage pool using pre-provisioned azure managed disks?

Roman Skolin (Admin) 0 Reputation points
2025-02-28T10:27:13.6533333+00:00

I enabled Azure Container Storage in my cluster a couple of days ago using the azureDisks type. The default Azure Container Storage pool was configured and mapped to dynamically provisioned disks.

Now, I am trying to create a pre-provisioned storage pool using existing Azure-managed disks, following the official documentation: Create a pre-provisioned storage pool.

My AKS cluster has all the necessary roles to access my disks (Microsoft.Compute/disks/read).

After applying the given configuration from the documentation:

yaml Copy Edit apiVersion: containerstorage.azure.com/v1 kind: StoragePool metadata: name: sp-preprovisioned namespace: acstor spec: poolType: azureDisk: disks: - reference: /subscriptions/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/resourceGroups/RG-QDRANT/providers/Microsoft.Compute/disks/disk0 - reference: /subscriptions/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/resourceGroups/RG-QDRANT/providers/Microsoft.Compute/disks/disk1 the new storage pool is created, but the rest of the setup (PV, PVC, and StorageClass) is not properly created. In AKS, I can see my new storage pool, but it has 0 capacity and an "Unknown" status.

I tried reinstalling the Container Storage extension in AKS, but that did not help.

Is there anything else I need to do to create a new storage pool from existing disks in my Azure subscription?

Br

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

2 answers

Sort by: Most helpful
  1. Geethasri.V 15 Reputation points Microsoft External Staff
    2025-02-28T13:53:57.9066667+00:00

    Hi Roman Skolin (Admin),

    Welcome to the Microsoft Q&A Platform! Thank you for asking your question here.

    •\t Check Disk Status: Confirm the managed disks you are working with are unattached, healthy, and properly formatted. They must be empty and not have any file systems on them.

    •\t Verify Permissions: Ensure that your AKS cluster's managed identity has the Microsoft.Compute/disks/read permission for disks in your Azure subscription.

    •\t Update Storage Pool YAML: Have your YAML file properly reference each disk's full path and be sure it is correct. A revised example looks like this

    apiVersion: containerstorage.azure.com/v1
    kind: Storage Pool
    metadata:
      name: sp-preprovisioned
      namespace: acstor
    spec:
      poolType: azureDisk
      disks:
        - reference: "/subscriptions/{subscription_id}/resource Groups/{resource_group_name}/providers/Microsoft.Compute/disks/{disk_name1}"
        - reference: "/subscriptions/{subscription_id}/resourceGroups/{resource_group_name}/providers/Microsoft.Compute/disks/{disk_name2}"
    

    • Create PV, PVC, and Storage Class: After ensuring the pool is created successfully with the correct capacity, create the PV, PVC, and Storage Class as outlined in your cluster configuration.

    • Re-create Pool if Necessary: If the problem still exists, remove the storage pool and re-create it after verifying the above steps.

    kubectl logs -n acstor <container-storage-controller-pod-name>
    

    Recreate Pool if Needed: If the issue persists, delete the storage pool and recreate it after checking the above steps.

    These actions should resolve the "Unknown" status and enable proper integration of the pre-provisioned disks into your Azure Container Storage environment.

    Please check these documents for the reference
    https://learn.microsoft.com/en-us/azure/storage/container-storage/container-storage-aks-quickstart?source=recommendations
    https://learn.microsoft.com/en-us/azure/storage/container-storage/install-container-storage-aks?source=recommendations

    If the comment was helpful, please don't forget to accept answer.

    Thank you.


  2. Roman Skolin 0 Reputation points
    2025-03-12T11:11:00.8866667+00:00

    In addition to the well-formed StoragePool cr,

    1. You would need to grant “Disk Pool Operator” role on the disk to the system node pool identity.
    2. If disks are outside of the AKS infrastructure resource group, you would need to grant “Contributor” role on the resource group that the disk is located, to the AKS cluster management identity.
    3. Ensure your disk shares the same zone with the zone of the system node pool. If the disk is NOT in any zone of the storage node pool, the disk can’t be attached.

    BR

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.