Azure Kubernetes Service (AKS) with Different Storage Options — Part 1

  • Azure Managed Disks (Static/Dynamic)
  • Azure Ultra Disk
  • Azure Files (Static/Dynamic)
  • Azure High-performance Computing (HPC) Cache
  • Azure NetApp Files
  • Network File System (NFS)
  • Container Storage Interface (CSI) Drivers
Image Source: Concepts — Storage in Azure Kubernetes Services (AKS) — Azure Kubernetes Service | Microsoft Docs

Azure Managed Disk

We can use this table as the best practice reference and decide which option to apply in the AKS environment. Although Azure Managed Disk could provide higher throughput than Azure Files, it could NOT simultaneously have multiple clients read and write, . If there is a workload that require multi-client operations, this option would not be ideal.

# check built-in storage class
kubectl get sc
# check the PVC provisioned from storage class
kubectl get pvc (option "-n <namespace>")
# update the aks-preview extension to support Azure Ultra Disks
az extension update --name aks-preview
# create a node pool that supports Azure Ultra Disks in the current cluster
az aks nodepool add -g <resource group name> --cluster-name <cluster name> --name <node pool name> --node-vm-size Standard_D2s_v3 --zones 1 2 --node-count 2 --enable-ultra-ssd
# create an Azure Ultra Disk storage class for dynamic creation
# reference: Enable Ultra Disk support on Azure Kubernetes Service (AKS) - Azure Kubernetes Service | Microsoft Docs
kubectl apply -f <file name of the YAML>
# check whether the storage class is being created successfully
kubectl get sc

Azure Files

Azure Files provide lower throughput than Azure Managed Disks but they could allow multiple client interaction simultaneously.

Azure HPC Cache

A couple of things to note when following the official article of provisioning Azure HPC Cache as PV/PVC for AKS Pods.

# install the HPC Cache extension
az extension add -n hpc-cache
# modify permissions to let HPC Cache identity to be able to access the created storage account / container
az storage container create --name <container name> --account-name <your storage account name, NOT "jebutlakestorage"> --auth-mode login
# check the resource group having the AKS-associated virtual network. Both Azure Private DNS Zone and Private Link need to be created within.
Integrate Azure HPC Cache with Azure Kubernetes Service - Azure Kubernetes Service | Microsoft Docs
# If you somehow get stuck when creating storage target within HPC Cache, you could refer to this site for creating the target from Azure portal.

Azure NetApp Files

Dynamic

# modify the Astra Trident backend template to have the correct Azure AD Service Principal credentials and Azure subscription
nano trident-installer/sample-input/backends-samples/azure-netapp-files/backend-anf.yaml
# install the modified Astra Trident backend template
kubectl apply -f trident-installer/sample-input/backends-samples/azure-netapp-files/backend-anf.yaml -n trident
# get the secret within trident namespace
kubectl get secrets -n trident
# get the trident backend config within trident namespace
kubectl get tridentbackendconfig -n trident
az provider register --namespace Microsoft.NetApp --wait

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Jonathan

Jonathan

Learning new things about Kubernetes every day. Hopefully, the learning notes could help people on the same journey!