Containers Data / Storage DevOps

Azure NetApp Files + Trident Integration – Part 2

This is a continuation to the blogpost by my colleague Sean Luce on NetApp trident integration with AKS. In this blog, we will discover some additional capabilities of Trident specially with Storage Classes and how Trident can intelligently create ANF volumes with desired performance tier based on required performance and throughput. We also explore how trident behaves in Azure production environment where customers usually have multiple ANF Capacity pools with same/different performance tiers.

Bonus – Some additional FAQs on trident with ANF

Let’s get started here:

  1. Install trident on the AKS cluster using Trident documentation

2. Create Trident Backend with the three storage performance levels(standard, premium, ultra) using the following json:

{

              “version”: 1,

              “storageDriverName”: “azure-netapp-files”,

              “backendName”: “TridentSCRizul”,

              “location”: “westeurope”,

              “subscriptionID”: “netapp-trident-netapp-trident”,

              “tenantID”: ” netapp-trident-netapp-trident”,

              “clientID”: ” netapp-trident-netapp-trident”,

              “clientSecret”: ” netapp-trident-netapp-trident”,

              “serviceLevel”: “Standard”,

              “debugTraceFlags”: {

                             “method”: true,

                             “api”: true

              },

              “virtualNetwork”: “aks-vnet-15039172”,

              “subnet”: “ANFSubnet”,

              “storage”: [{

                                           “labels”: {

                                                          “performance”: “gold”

                                           },

                                           “serviceLevel”: “Ultra”

                             },

                             {

                                           “labels”: {

                                                          “performance”: “silver”

                                           },

                                           “serviceLevel”: “Premium”

                             },

                             {

                                           “labels”: {

                                                          “performance”: “bronze”

                                           },

                                           “serviceLevel”: “Standard”

                             }

              ]

}

You get the output as below:

3. Create three storage classes: Bronze, Silver and Gold corresponding to ANF Standard, Premium and Ultra tier respectively with below YAML file(s):

apiVersion: storage.k8s.io/v1

kind: StorageClass

metadata:

  name: bronze

provisioner: csi.trident.netapp.io

parameters:

  backendType: “azure-netapp-files”

  fsType: “nfs”

  selector: “performance=bronze”

apiVersion: storage.k8s.io/v1

kind: StorageClass

metadata:

  name: silver

provisioner: csi.trident.netapp.io

parameters:

  backendType: “azure-netapp-files”

  fsType: “nfs”

  selector: “performance=silver”

apiVersion: storage.k8s.io/v1

kind: StorageClass

metadata:

  name: gold

provisioner: csi.trident.netapp.io

parameters:

  backendType: “azure-netapp-files”

  fsType: “nfs”

  selector: “performance=gold”

Check storage classes on the AKS cluster and you should get the output as below:

4. As a pre-requisite to using trident, make sure at least one ANF Capacity pool corresponding to each the performance tiers i.e. standard, premium and ultra. You can use terraform to deploy the ANF capacity pools using instructions in the blogpost here

5. We can now start creating PVCs across the three capacity pools using the following YAML file:

kind: PersistentVolumeClaim

apiVersion: v1

metadata:

  name: gold

spec:

  accessModes:

    – ReadWriteOnce

  resources:

    requests:

      storage: 1Ti

  storageClassName: gold

kind: PersistentVolumeClaim

apiVersion: v1

metadata:

  name: silver

spec:

  accessModes:

    – ReadWriteOnce

  resources:

    requests:

      storage: 1Ti

  storageClassName: silver

kind: PersistentVolumeClaim

apiVersion: v1

metadata:

  name: bronze

spec:

  accessModes:

    – ReadWriteOnce

  resources:

    requests:

      storage: 1Ti

  storageClassName: bronze

—                                                                                                                                          

You get the output on the cli here:

You can see ANF volume under Gold/Ultra Capacity Pool:

6. We can see the following output on the cli:

We notice the volumes created inside each capacity pool on the Azure portal:

We see all the three PVCs corresponding to the three NFS volumes in the three different capacity pools created as below:

Hurray! This is working as expected and using a label selector in our deployment file, we are able to create volumes with the desired performance tier on ANF.

Some additional FAQs on Trident with ANF:

  1. Is there a way to scope the trident operator backend config to provision new ANF volumes from specific ANF capacity pool instead of letting it choose randomly?

Answer: Today Trident fetches candidate capacity pools and creates an ANF volume at random from one of those. You cannot control this behavior. It is recommended to create a dedicated ANF Account for your AKS deployments for dynamic provisioning capabilities with trident

  • Is there is any official helm chart repository provided by NetApp to install the operator without manually downloading it from Github?

Answer: The Trident Helm chart is now hosted on ArtifactHub: https://artifacthub.io/packages/helm/netapp-trident/trident-operator

  • Does Trident support Manual QoS based ANF capacity pools?

Answer: Not yet. This might be supported in the future

  • Is it possible to take advantage of Azure Managed Identities instead of using manually created service principals with Trident?

Answer: Not yet. This might be supported in the future

Leave a Reply

%d bloggers like this: