You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/aks/cost-analysis.md
+17-27Lines changed: 17 additions & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
title: Azure Kubernetes Service cost analysis (preview)
2
+
title: Azure Kubernetes Service cost analysis
3
3
description: Learn how to use cost analysis to surface granular cost allocation data for your Azure Kubernetes Service (AKS) cluster.
4
4
author: nickomang
5
5
ms.author: nickoman
@@ -11,7 +11,7 @@ ms.date: 11/06/2023
11
11
#CustomerIntent: As a cluster operator, I want to obtain cost management information, perform cost attribution, and improve my cluster footprint
12
12
---
13
13
14
-
# Azure Kubernetes Service cost analysis (preview)
14
+
# Azure Kubernetes Service cost analysis
15
15
16
16
An Azure Kubernetes Service (AKS) cluster is reliant on Azure resources like virtual machines, virtual disks, load-balancers and public IP addresses. These resources can be used by multiple applications, which could be maintained by several different teams within your organization. Resource consumption patterns of those applications are often nonuniform, and thus their contribution towards the total cluster resource cost is often nonuniform. Some applications can also have footprints across multiple clusters. This can pose a challenge when performing cost attribution and cost management.
17
17
@@ -31,7 +31,6 @@ To address this challenge, AKS has integrated with MCM to offer detailed cost dr
31
31
32
32
The AKS cost analysis addon is built on top of [OpenCost](https://www.opencost.io/), an open-source Cloud Native Computing Foundation Sandbox project for usage data collection, which gets reconciled with your Azure invoice data. Post-processed data is visible directly in the [MCM Cost Analysis portal experience](/azure/cost-management-billing/costs/quick-acm-cost-analysis).
33
33
34
-
[!INCLUDE [preview features callout](./includes/preview/preview-callout.md)]
35
34
36
35
## Prerequisites and limitations
37
36
@@ -45,12 +44,12 @@ The AKS cost analysis addon is built on top of [OpenCost](https://www.opencost.i
45
44
46
45
* If using the Azure CLI, you must have version `2.44.0` or later installed, and the `aks-preview` Azure CLI extension version `0.5.155` or later installed.
47
46
48
-
* The `ClusterCostAnalysis` feature flag must be registered on your subscription.
49
-
50
47
* Kubernetes cost views are available only for the following Microsoft Azure Offer types. For more information on offer types, see [Supported Microsoft Azure offers](/azure/cost-management-billing/costs/understand-cost-mgt-data#supported-microsoft-azure-offers).
51
48
* Enterprise Agreement
52
49
* Microsoft Customer Agreement
53
50
51
+
* Virtual nodes not supported at this time.
52
+
54
53
55
54
### Install or update the `aks-preview` Azure CLI extension
56
55
@@ -66,26 +65,6 @@ If you need to update the extension version, you can do this using the [`az exte
66
65
az extension update --name aks-preview
67
66
```
68
67
69
-
### Register the 'ClusterCostAnalysis' feature flag
70
-
71
-
Register the `ClusterCostAnalysis` feature flag by using the [az feature register][az-feature-register] command, as shown in the following example:
72
-
73
-
```azurecli-interactive
74
-
az feature register --namespace "Microsoft.ContainerService" --name "ClusterCostAnalysis"
75
-
```
76
-
77
-
It takes a few minutes for the status to show *Registered*. Verify the registration status by using the [az feature show][az-feature-show] command:
78
-
79
-
```azurecli-interactive
80
-
az feature show --namespace "Microsoft.ContainerService" --name "ClusterCostAnalysis"
81
-
```
82
-
83
-
When the status reflects *Registered*, refresh the registration of the *Microsoft.ContainerService* resource provider by using the [az provider register][az-provider-register] command:
84
-
85
-
```azurecli-interactive
86
-
az provider register --namespace Microsoft.ContainerService
87
-
```
88
-
89
68
## Enable cost analysis on your AKS cluster
90
69
91
70
Cost analysis can be enabled during one of the following operations:
@@ -119,10 +98,18 @@ az aks update --name myAKSCluster --resource-group myResourceGroup --disable-cos
119
98
120
99
## View cost information
121
100
122
-
You can view cost allocation data in the Azure portal. To learn more about how to navigate the cost analysis UI view, see the [Cost Management documentation](/azure/cost-management-billing/costs/view-kubernetes-costs).
101
+
You can view cost allocation data in the Azure portal. To learn more about how to navigate the cost analysis UI view, see the [Cost Management documentation](/azure/cost-management-billing/costs/view-kubernetes-costs).
123
102
124
103
> [!NOTE]
125
-
> It might take up to one day for data to finalize
104
+
> It might take up to one day for data to finalize.
105
+
106
+
### Cost definitions
107
+
In the Kubernetes namespaces and assets views you will see the following charges:
108
+
-**Idle charges**: This represents the portion of resource allocation costs that are not allocated to any workload.
109
+
-**Service charges**: This represents the charges for the SLA meter.
110
+
-**System charges**: This represents the cost of capacity reserved by AKS on each node to run system processes required by the cluster, including the kubelet and container runtime. [Learn more](./concepts-clusters-workloads.md#resource-reservations).
111
+
-**Unallocated charges**: This represents the cost of resources that could not be allocated to namespaces.
112
+
126
113
127
114
## Troubleshooting
128
115
@@ -133,3 +120,6 @@ See the following guide to troubleshoot [AKS cost analysis add-on issues](/troub
Visbility is one element of cost management. Refer to [Optimize Costs in Azure Kubernetes Service (AKS)](./best-practices-cost.md) for additional best practices on how to gain control over your kubernetes cost.
0 commit comments