Explanation
Why the waste happens and who it affects.
Common examples include Persistent Volume Claims (PVCs) backed by Azure Disks, Services that trigger load balancer provisioning, or stale ConfigMaps and Secrets. When the associated deployments or pods are removed, these resources may remain unless explicitly deleted.
In AKS, this can lead to unmanaged costs, such as idle managed disks from orphaned PVCs or public load balancers from Services of type LoadBalancer. Even lightweight resources like unused Secrets or ConfigMaps degrade cluster hygiene and can introduce security or operational risk. This inefficiency is common across Kubernetes environments and is scoped here to AKS.
Billing model
The pricing dimensions that drive this cost.
While AKS clusters on the Free tier do not charge for the control plane (the Standard and Premium tiers add a charge for cluster management), costs arise from the underlying compute (VMs or node pools), storage (e.g., managed disks from PVCs), and networking (e.g., public IPs and load balancers from Services). Orphaned Kubernetes objects - such as PVCs, Services, ConfigMaps, and Secrets-may persist beyond the lifecycle of the workloads that created them, causing unnecessary consumption of Azure resources and cost.
How to detect
10 checks to find it in your estate.
- Review Kubernetes objects not linked to active Deployments, StatefulSets, or running Pods
- Check across all namespaces, not just default (default should never be deleted
- Check for PVCs not mounted by any current workload
- kubectl get pvc --all-namespaces to check PVC usage
- Identify Services of type LoadBalancer that are not backed by any endpoints
- kubectl get svc -o wide to identify LoadBalancer services
- Confirm whether any retained Services have public IPs or Azure Load Balancers associated
- Locate Secrets and ConfigMaps with old creation dates and no recent usage
- Validate that no Jobs or CronJobs are expected to recreate workloads using these resources
- kubectl get secrets,configmaps --show-labels for unused resources
How to fix
5 ways to remove the waste.
- Before deletion, verify resources are truly orphaned
- Delete orphaned PVCs to release Azure Managed Disks
- Remove Services that no longer front active workloads to deallocate Load Balancers and public IPs
- Clean up unreferenced ConfigMaps and Secrets
- Use scheduled audits or automation tools to identify and clean up orphaned resources regularly
Documentation
Vendor references for pricing and configuration.
- Concepts - Storage in Azure Kubernetes Service (AKS) - Azure Kubernetes Servicelearn.microsoft.com
- Use a Public Standard Load Balancer in Azure Kubernetes Service (AKS) - Azure Kubernetes Servicelearn.microsoft.com
- Azure Kubernetes Service (AKS) Free, Standard, and Premium Pricing Tiers - Azure Kubernetes Servicelearn.microsoft.com
- Pricing - Azure Kubernetes Service (AKS)azure.microsoft.com