Setting the file. One moment.
Subchapter 13.9
cost-optimization/azure-aks-cost-addon.mdMarkdown1 KBView on GitHub
Enable namespace-level cost visibility using the built-in AKS cost monitoring add-on.
# Check if add-on is enabled
az aks show \
--name "<cluster-name>" --resource-group "<resource-group>" \
--query "addonProfiles.costAnalysis" -o json
# Check cluster tier (add-on requires Standard or Premium)
az aks show \
--name "<cluster-name>" --resource-group "<resource-group>" \
--query "{tier:sku.tier, name:name}" -o table# Requires Standard or Premium tier
az aks update \
--name "<cluster-name>" --resource-group "<resource-group>" \
--enable-cost-analysisWarn 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:
az aks update \
--name "<cluster-name>" --resource-group "<resource-group>" \
--tier standard
az aks update \
--name "<cluster-name>" --resource-group "<resource-group>" \
--enable-cost-analysisNamespace-level cost data is available in:
kubernetes namespace dimensionRisk: Low for enabling the add-on. Upgrading tier (Free -> Standard) has a cost — always confirm with user first.