- 08 Jul 2024
- 1 Minute to read
- Print
- DarkLight
Create PVC on Azure AKS
- Updated on 08 Jul 2024
- 1 Minute to read
- Print
- DarkLight
As prerequisites for this flow, be sure to have the Azure Kubernetes Service (AKS) ready. Then follow these links:
Use the CSI Driver Token (Refresh Token). This can be taken from Volumez.com. Go to Sign in > Developer Info.
Region - Set the Target Azure resource group region (for example: East US).
AKS cluster creation:
Create with default values, as follows:
terraform init
terraform apply -var-file=”easy_starter.tfvars”
Usage (helm): Deploy Volumez-CSI configuration
Configure kubectl so that you can connect to an AKS cluster, as follows:
az aks get-credentials --resource-group <resource-group-name> --name <aks-cluster-name>
The resource-group-name and aks-cluster-name parameters can be found in Terraform's output.
Deploy CSI driver deployment with helm:
helm repo add volumez-csi https://volumeztech.github.io/helm-csi
helm install volumez-csi volumez-csi/volumez-csi --set vlzAuthToken=eyJjdHkiOiJKV1QiLC -n vlz-csi-driver --create-namespace
Install Only on Specific Node/Node-Group
To install the volumez-csi on a specific node or nodegroup, label the node/nodegroup and add the following to the end of the install command (fill in the correct values instead of "label-key" and "label-values"):
--set-json 'csiNodeVlzplugin.affinity={"nodeAffinity":{"requiredDuringSchedulingIgnoredDuringExecution":{"nodeSelectorTerms":[{"matchExpressions":[{"key":"<label-key>","operator":"In","values":["<label-values>"]}]}]}}}'
Like so:
--set-json 'csiNodeVlzplugin.affinity={"nodeAffinity":{"requiredDuringSchedulingIgnoredDuringExecution":{"nodeSelectorTerms":[{"matchExpressions":[{"key":"nodepool-type","operator":"In","values":["app", "media"]}]}]}}}'
After completing the prerequisites, configure the Volumez settings for your selected mode of operation:
Auto-Provisioned Volume
Shared Media Volume
These terms are explained here: https://docs.volumez.com/v1/docs/create-volumes
A note on retrieving metadata in Azure AKS:
Part of the responsibility of the NodeServer's sidecar is to retrieve the relevant current node metadata such as VPC. AP creation for Azure must have the VPC where the AKS cluster’s nodes are deployed. Due to the nature of the Azure node IDs being created (Volumez customized ID), the only way to retrieve the VPC is through the Tenant Cloud Resources (TCR) service. Therefore, every time the NodeServer sidecar is started up, a GetVMMetadataByRegion
request is created for the TCR service.