Ask Learn Preview
Please sign in to use this experience.
Sign inThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
In this module, you explored strategies to optimize Azure Kubernetes Service (AKS) compute costs. You were looking for ways to manage the cost-effective deployment of many workloads to meet customer demands and apply policies. You automated the process to introduce business policies that govern how your development teams shape how your org uses AKS compute resources.
By configuring multiple node pools on your AKS cluster, you identified specific user node pools to run specific workloads. You saw how to configure these node pools and manually scale the node count in scenarios where you have control over usage intervals.
Next, you configured a spot user node pool to access unused Azure compute capacity at a discount price. You built scheduled workloads to run in the node pool. You configured the cluster autoscaler to scale the number of nodes up or down based on computing resource requirements. This configuration handles increased customer demands without creating many nodes that aren't used.
Finally, you enabled and configured the Azure Policy Add-on for AKS. The add-on manages resource quotas to govern the deployment of AKS compute resources. You enabled the built-in Ensure CPU and memory resource limits policy. This policy configures parameters to deny workloads that exceed predefined resource limits for CPU and memory.
AKS makes it simple to deploy a managed Kubernetes cluster in Azure and to optimize computing costs when many workloads are running.
In this module, you created billed resources on your Azure subscription. The following steps show you how to clean up these resources so that there's no continued charge against your account.
Open the Azure portal.
Select Resource groups.
Find the rg-akscostsaving resource group, or the resource group name you used, and select it.
On the Overview tab of the resource group, select Delete resource group.
Enter the name of the resource group to confirm. Select Delete to delete all of the resources you created in this module. Select Delete again to confirm the deletion.
Finally, run the kubectl config delete-context
command to remove the deleted cluster's context. Here's an example of the complete command. Remember to replace the name of the cluster with your cluster's name.
kubectl config delete-context akscostsaving-17835
If the command succeeds, it returns output like this:
deleted context akscostsaving-17835 from /home/user/.kube/config
In this module, you also registered service providers within Azure to access their features. There's no extra charge for registering the providers or features. Follow these steps to unregister.
Run the following command to unregister the Azure Policy on AKS feature.
az feature unregister --namespace Microsoft.ContainerService --name AKS-AzurePolicyAutoApprove
Repeat for the Azure providers.
az provider unregister --namespace Microsoft.PolicyInsights
az provider unregister --namespace Microsoft.ContainerService
Important
If you choose to unregister, then the optimization features covered in the learning module aren't able until you register.
To learn more about each of the concepts covered in this module, visit these articles and sites:
Create node pools for a cluster in Azure Kubernetes Service (AKS)
Add a spot node pool to an Azure Kubernetes Service (AKS) cluster
Automatically scale a cluster to meet application demands on Azure Kubernetes Service (AKS)
Best practices for advanced scheduler features in Azure Kubernetes Service (AKS)
Baseline architecture for an Azure Kubernetes Service (AKS) cluster
Having an issue? We can help!
Please sign in to use this experience.
Sign in