Reducing costs for Windows workloads on Azure Kubernetes Service with Azure Hybrid Benefits

Happy new year everyone! What better way to get the year started than saving some money, right? Last year, as customers continued to move their Windows workloads to Azure Service (AKS) and evolve these deployments, they started to explore cost saving strategies. Granted, there are many ways to save costs when running in the cloud and especially when it comes to AKS as you can scale up or down and in or out, reduce the size of your deployment, replicas, node size, and more. However, for Windows workloads, one of the simplest ways to save is by leveraging the Azure Hybrid Benefit.

If you haven't heard of it, AHB allows commercial customers to use their on-premises licenses that also have either active Software Assurance (SA) or a qualifying subscription to get Windows (VMs) on Azure at a reduced cost. Since there are requirements to enable AHB, I highly recommend you look at the official documentation to ensure you are covered. If you are covered, this blog post will show you what are the benefits, and enable it for AKS clusters with Windows nodes.

Azure Hybrid Benefit costs explained

You can save with AHB on multiple Azure and hybrid services. For example, AHB can be used for Windows Server VMs running on Azure, Windows Server VMs running on Azure Stack , and AKS and AKS Hybrid.

AHB for Windows AKS.png

For the case of AKS, when running Windows Server nodes you can apply the same principle as option #1 in the image above. Windows Server nodes on AKS run on Azure Virtual Machine Scale Sets, so they are essentially Azure VMs – but managed by the AKS service. The cost reduction when AHB is applied is on the Windows Server Guest OS cost.

On a hypothetical scenario, a company with 50 Windows Server core, on-premises licenses with active Software Assurance, running on Azure in the West US region, with instances of D4s-v3 (4 cores, 16GB RAM, 32GB SSD) and VMs turned on for the entire month, can get 5 eligible VMs. Their monthly costs for these VMs would be estimated at $1,525.70, but with AHB they save $671.60, resulting in a final cost of $854.10.

AHB for Windows AKS02.png

You can calculate the cost for your environment with the Azure Hybrid Benefit Savings Calculator.

enable AHB for AKS

Once you have the licensing figured out for your company, you can enable AHB for your Windows workloads on AKS. You can either enable AHB for an existing AKS or create a new with AHB already enabled.

To enable AHB on an existing :

az aks update -g MyResourceGroup -n MyAKSCluster --enable-ahub

Note: The command above will recreate the Windows VMs on your AKS cluster and the process might impact your workloads.

To create a new cluster with AHB already enabled:

az aks create -g MyResourceGroup -n MyManagedCluster --load-balancer-sku Standard --network-plugin azure --windows-admin-username azure --windows-admin-password 'replacePassword1234$' --enable-ahub

Once you create the cluster you can create the Windows node pool. AHB will be enabled for all Windows nodes in this cluster.

That's it! The process is actually very simple.

Hopefully this article will help you understand save on Azure costs for Windows workloads on AKS, and help you get it configured for your environment. Let us know in the comments below if you have any questions!

 

This article was originally published by Microsoft's ITOps Talk Blog. You can find the original article here.