Skill 01 · AKS Cost Optimization
Subchapter 1.4
references/aks-storage-optimization.mdMarkdown4 KBView on GitHub
Reduce AKS persistent-volume and disk cost without weakening durability or performance. Never delete, migrate, change tier/redundancy, or recreate a node pool without explicit approval.
This workflow provides detailed rightsizing for Azure Disk CSI volumes and snapshots. For Azure Files or Blob CSI volumes, first verify the Kubernetes-to-Azure mapping, then invoke cost-optimization when available for service-specific lifecycle, tier, and pricing analysis. Use azure-storage for non-cost configuration guidance.
kubectl only when the bound context is available:az aks show --name "<cluster-name>" --resource-group "<resource-group>" \
--query "{id:id,nodeResourceGroup:nodeResourceGroup,location:location,workspace:addonProfiles.omsagent.config.logAnalyticsWorkspaceResourceID}" \
-o jsonkubectl get pvc,pv,storageclass --all-namespaces -o jsonMap PVC -> PV -> StorageClass -> spec.csi.volumeHandle. Retain PVC/PV UIDs, requested capacity, status, claim reference, provisioner, SKU, reclaim policy, access modes, and volume binding mode; distinguish Azure Disk, Files, and Blob CSI volumes.
Query Resource Graph for microsoft.compute/disks and microsoft.compute/snapshots when the resource is in the node resource group, its ID matches a PV volume handle, or its snapshot source is a mapped disk. Project ID, name, resource group, location, SKU, size, disk state, managedBy, creation time, snapshot source ID, provisioned IOPS/throughput, and tags. Compare exact case-insensitive resource IDs with PV volume handles, then classify each resource under the applicable path:
If cost-analysis is available in the host skill inventory, invoke it to retrieve billed ActualCost grouped by ResourceId for verified mapped resources and verified orphan candidates at the smallest applicable scope. Correlate only exact resource IDs. If the skill or required cost data is unavailable, continue with utilization and performance evidence, report attributable cost and monetary savings as unavailable rather than zero.
For active verified Azure Disk mappings, use storage metrics for binding-scoped capacity, IOPS, throughput, latency, and throttling evidence. Retain identity/interval verification, coverage/gaps, units, aggregation basis, and capacity changes per disk. Missing, sparse, ambiguous, or unrepresentative history means unknown utilization, not zero.
After collecting applicable evidence, use storage decisions to classify candidates and recommend changes.