Validate Valkey resiliency during an Azure Kubernetes Service (AKS) node pool upgrade

Using the same Valkey cluster on Azure Kubernetes Service (AKS) that you deployed with Locust, you can validate the resiliency of the Valkey cluster during an AKS node pool upgrade. This process helps validate that Valkey maintains resiliency during AKS node pool upgrades. Monitoring with Locust ensures visibility into request handling and shard availability, allowing you to confidently manage upgrades with minimal service disruption.

Upgrade the AKS cluster

  1. List the available versions for the AKS cluster and identify the target version you're upgrading to using the az aks get-upgrades command.

    az aks get-upgrades --resource-group $MY_RESOURCE_GROUP_NAME --name $MY_CLUSTER_NAME --output table
    
  2. Upgrade the AKS control plane using the az aks upgrade command. In this example, the target version is 1.33.0.

    az aks upgrade --resource-group $MY_RESOURCE_GROUP_NAME --name $MY_CLUSTER_NAME --control-plane-only --kubernetes-version 1.33.0
    

Verify Locust client status

Upgrade the Valkey node pool

  1. Upgrade the Valkey node pool using the az aks nodepool upgrade command.

    az aks nodepool upgrade \
        --resource-group $MY_RESOURCE_GROUP_NAME \
        --cluster-name $MY_CLUSTER_NAME \
        --kubernetes-version 1.33.0 \
        --name valkey
    
  2. While the upgrade process is running, you can monitor the Locust dashboard to see the status of the client requests. The dashboard should look similar to the following screenshot:

    Screenshot of a web page showing the Locust test dashboard during the AKS upgrade.

    The dashboard shows that Locust is running with 100 users making 50 requests per second. During the upgrade process, a primary pod is evicted four times. You can see the shard isn't available for a few seconds, but the Valkey cluster can still respond to requests for the other shards.

To learn more about stateful workloads on AKS, see Design and deploy stateful workloads on Azure Kubernetes Service (AKS).