AKS Cost Analysis add-on issues
This article discusses how to troubleshoot problems that you might experience when you enable the Microsoft Azure Kubernetes Service (AKS) Cost Analysis add-on during cluster creation or a cluster update.
Prerequisites
Symptoms
After you create or update an AKS cluster, you receive an error message in the following format:
OperationNotAllowed with <error-code> id
The following table displays the possible error codes and their corresponding causes.
Error code | Cause |
---|---|
InvalidDiskCSISettingForCostAnalysis |
Cause 1: Azure Disk CSI driver is disabled |
InvalidManagedIdentitySettingForCostAnalysis |
Cause 2: Managed identity is disabled |
CostAnalysisNotEnabledInRegion |
Cause 3: The add-on is unavailable in your region |
InvalidManagedClusterSKUForFeature |
Cause 4: The add-on is unavailable on the free pricing tier |
Cause 1: Azure Disk CSI driver is disabled
You can't enable the Cost Analysis add-on on a cluster in which the Azure Disk Container Storage Interface (CSI) driver is disabled.
Solution 1: Update the cluster to enable the Azure Disk CSI driver
Run the az aks update command, and specify the --enable-disk-driver
parameter. This parameter enables the Azure Disk CSI driver in AKS.
az aks update --resource-group <my-resource-group> --name <my-aks-cluster> --enable-disk-driver
For more information, see CSI drivers on AKS.
Cause 2: Managed identity is disabled
You can enable the Cost Analysis add-on only on a cluster that has a system-assigned or user-assigned managed identity.
Solution 2: Update the cluster to enable managed identity
Run the az aks update command, and specify the --enable-managed-identity
parameter:
az aks update --resource-group <my-resource-group> --name <my-aks-cluster> --enable-managed-identity
For more information, see Use a managed identity in AKS.
Cause 3: The add-on is unavailable in your region
The Cost Analysis add-on isn't currently enabled in your region.
Note
The AKS Cost Analysis add-on is currently unavailable in the following regions:
usnateast
usnatwest
usseceast
ussecwest
Cause 4: The add-on is unavailable on the free pricing tier
You can't enable the Cost Analysis add-on on AKS clusters that are on the free pricing tier.
Solution 4: Update the cluster to use the Standard or Premium pricing tier
Upgrade the AKS cluster to the Standard or Premium pricing tier. To do this, run one of the following az aks update commands that specify the --tier
parameter:
az aks update --resource-group <my-resource-group> --name <my-aks-cluster> --tier standard
az aks update --resource-group <my-resource-group> --name <my-aks-cluster> --tier premium
For more information, see Free and Standard pricing tiers for AKS cluster management.
Contact us for help
If you have questions or need help, create a support request, or ask Azure community support. You can also submit product feedback to Azure feedback community.
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for