Azure / AKS

Azure Kubernetes Service
https://azure.github.io/AKS/
1.96k stars 305 forks source link

AKS Cost Analysis - API access for users #4417

Open kajetanm-dnv opened 2 months ago

kajetanm-dnv commented 2 months ago

Today it is possible to obtain data from the AKS Cost Analysis add-on only through the Azure Portal or downloaded CSV files.

Using az CLI credentials to create an API call throws an error: {"error":{"code":"401","message":"Request blocked. Your request to this resource has been denied. Please access this resource from the Cost Analysis blade on the Azure Portal."}}

To automate add-on usage and obtain data from tables, it should be possible to provide users with access to use API.

eikeatb commented 1 month ago

We also need access to the API.

Forcebyte commented 5 days ago

I asked this as well to MSFT Support, here's the response we got:

I understand that you are encountering an error when attempting to query the Azure AKS Cost API, specifically the following message:

{'error':{'code':'401','message':'Request blocked. Your request to this resource has been denied. Please access this resource from the Cost Analysis blade on the Azure Portal.'}}

This issue arises because direct API access to cost data for AKS is currently restricted, and Azure recommends viewing cost data via the Cost Analysis blade in the Azure Portal. Unfortunately, querying cost data at the namespace level via API is not natively supported at this time, which I understand is important for your tracking and reporting needs.

As per if there's an ETA for release:

At this time, there is no confirmed ETA from Microsoft regarding when native support for querying AKS costs at the namespace level via API will be available. However, the Azure Product Group is actively working on improving cost management capabilities for AKS, including more granular reporting.