Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Analyze Azure subscriptions to find cost savings via orphaned resources, rightsizing, and usage data
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
cost-optimization/azure-aks-cost-addon.md
1# AKS Cost Analysis Add-on23Enable namespace-level cost visibility using the built-in AKS cost monitoring add-on.45## Check Status67```bash8# Check if add-on is enabled9az aks show \10--name "<cluster-name>" --resource-group "<resource-group>" \11--query "addonProfiles.costAnalysis" -o json1213# Check cluster tier (add-on requires Standard or Premium)14az aks show \15--name "<cluster-name>" --resource-group "<resource-group>" \16--query "{tier:sku.tier, name:name}" -o table17```1819## Enable Add-on2021```bash22# Requires Standard or Premium tier23az aks update \24--name "<cluster-name>" --resource-group "<resource-group>" \25--enable-cost-analysis26```2728## If Cluster is Free Tier2930Warn user that upgrading from Free to Standard introduces an ongoing cluster management fee. Use the official AKS pricing page or this skill’s pricing validation step to confirm the current cost with the user and obtain explicit approval before proceeding. After user approval:3132```bash33az aks update \34--name "<cluster-name>" --resource-group "<resource-group>" \35--tier standard3637az aks update \38--name "<cluster-name>" --resource-group "<resource-group>" \39--enable-cost-analysis40```4142## After Enabling4344Namespace-level cost data is available in:45- Azure Portal: AKS cluster -> Cost Analysis blade46- Azure Cost Management: filter by cluster resource ID + `kubernetes namespace` dimension4748> Risk: Low for enabling the add-on. Upgrading tier (Free -> Standard) has a cost — always confirm with user first.49