Search code examples
azurekubernetesazure-devopsazure-aks

How to attach a disk in Kubernetes cluster in azure (AKS)


I have deployed my running application in AKS. I want to add new disk (Harddisk of 30GB) but I don't know how to do it.

I want to attach 3 disks.

Here is details of AKS:

  • Node size: Standard_DS2_v2
  • Node pools: 1 node pool
  • Storage is:

default (default)   kubernetes.io/azure-disk   Delete          WaitForFirstConsumer   true

Please, tell me how to add it.


Solution

  • Based on Kubernetes documentation:

    A PersistentVolume (PV) is a piece of storage in the cluster that has been provisioned by an administrator or dynamically provisioned using Storage Classes.

    It is a resource in the cluster just like a node is a cluster resource. PVs are volume plugins like Volumes, but have a lifecycle independent of any individual Pod that uses the PV.

    In the Azure documentation one can find clear guides how to:

    NOTE: Before you begin you should have existing AKS cluster and Azure CLI version 2.0.59 or later installed and configured. To check your version run:

    az --version
    

    See also this documentation.