Skip to content

Commit 29d5bba

Browse files
authored
Merge pull request #1 from tamram/tamram-268754
raise Acrolinx score & minor edits
2 parents 0e79a74 + 0c71507 commit 29d5bba

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

articles/aks/cost-analysis.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,37 +6,36 @@ ms.author: nickoman
66
ms.service: azure-kubernetes-service
77
ms.custom: ignite-2023, devx-track-azurecli
88
ms.topic: how-to
9-
ms.date: 11/06/2023
9+
ms.date: 03/15/2024
1010

1111
#CustomerIntent: As a cluster operator, I want to obtain cost management information, perform cost attribution, and improve my cluster footprint
1212
---
1313

1414
# Azure Kubernetes Service cost analysis
1515

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 might be maintained by different teams within your organization. Resource consumption patterns for those applications are often variable, so their contribution towards the total cluster resource cost can also vary. Some applications can also have footprints across multiple clusters, which can pose a challenge when performing cost attribution and cost management.
16+
An Azure Kubernetes Service (AKS) cluster is reliant on Azure resources like virtual machines, virtual disks, load-balancers, and public IP addresses. Multiple applications can use these resources, which might be maintained by different teams within your organization. Resource consumption patterns for those applications are often variable, so their contribution towards the total cluster resource cost can also vary. Some applications can also have footprints across multiple clusters, which can pose a challenge when performing cost attribution and cost management.
1717

1818
Previously, [Microsoft Cost Management (MCM)](../cost-management-billing/cost-management-billing-overview.md) aggregated cluster resource consumption under the cluster resource group. You could use MCM to analyze costs, but there were several challenges:
1919

2020
* There was no Azure-native capability to display cluster resource usage at a level more granular than a cluster. There was no breakdown into discrete categories such as compute (including CPU cores and memory), storage, and networking.
2121

22-
* There was no Azure-native functionality to distinguish between types of costs. For example, individual application versus shared costs. MCM reported the cost of resources, but there was no insight into how much of the resource cost was used to run individual applications, reserved for system processes required by the cluster, or idle cost associated with the cluster.
22+
* There was no Azure-native functionality to distinguish between types of costs, for example between individual application costs and shared costs. MCM reported the cost of resources, but there was no insight into how much of the resource cost was used to run individual applications, how much was reserved for system processes required by the cluster, or what were the idle costs associated with the cluster.
2323

2424
* There was no Azure-native mechanism to analyze costs across multiple clusters in the same subscription scope.
2525

26-
As a result, you might have used third-party solutions to gather and analyze resource consumption and costs by Kubernetes-specific levels of granularity, such as by namespace or pod. Third-party solutions, however, require effort to deploy, fine-tune, and maintain for each AKS cluster. In some cases, you even need to pay for advance features, increasing the cluster's total cost of ownership.
26+
As a result, you might have used third-party solutions to gather and analyze resource consumption and costs by Kubernetes-specific levels of granularity, such as by namespace or pod. Third-party solutions, however, require effort to deploy, fine-tune, and maintain for each AKS cluster. In some cases, you even need to pay for advanced features, increasing the cluster's total cost of ownership.
2727

28-
To address this challenge, AKS has integrated with MCM to offer detailed cost drill down scoped to Kubernetes constructs, such as cluster and namespace, in addition to Azure Compute, Network, and Storage categories.
29-
30-
The AKS cost analysis addon is built on top of [OpenCost](https://www.opencost.io/), an open-source Cloud Native Computing Foundation 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).
28+
To address this challenge, AKS has integrated with MCM to offer detailed cost drill-down scoped to Kubernetes constructs, such as cluster and namespace, in addition to Azure Compute, Network, and Storage categories.
3129

30+
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. The cost analysis is 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).
3231

3332
## Prerequisites and limitations
3433

3534
* Your cluster must be either `Standard` or `Premium` tier, not the `Free` tier.
3635

3736
* To view cost analysis information, you must have one of the following roles on the subscription hosting the cluster: Owner, Contributor, Reader, Cost management contributor, or Cost management reader.
3837

39-
* Once cost analysis has been enabled, you can't downgrade your cluster to the `Free` tier without first disabling cost analysis.
38+
* Once you have enabled cost analysis, you can't downgrade your cluster to the `Free` tier without first disabling cost analysis.
4039

4140
* Your cluster must be deployed with a [Microsoft Entra Workload ID](./workload-identity-overview.md) configured.
4241

@@ -46,7 +45,7 @@ The AKS cost analysis addon is built on top of [OpenCost](https://www.opencost.i
4645
* Enterprise Agreement
4746
* Microsoft Customer Agreement
4847

49-
* Virtual nodes are not supported at this time.
48+
* Virtual nodes aren't supported at this time.
5049

5150

5251
### Install or update the `aks-preview` Azure CLI extension
@@ -67,7 +66,7 @@ az extension update --name aks-preview
6766

6867
Cost analysis can be enabled during one of the following operations:
6968

70-
* Create a `Standard` or `Premium` tier AKS cluster
69+
* Create a `Standard` or `Premium` tier AKS cluster.
7170

7271
* Update an AKS cluster that is already in `Standard` or `Premium` tier.
7372

@@ -77,7 +76,7 @@ Cost analysis can be enabled during one of the following operations:
7776

7877
* Downgrade a `Premium` cluster to `Standard` tier.
7978

80-
To enable the feature, use the flag `--enable-cost-analysis` in combination with one of these operations. For example, the following command will create a new AKS cluster in the `Standard` tier with cost analysis enabled:
79+
To enable the feature, use the flag `--enable-cost-analysis` in combination with one of these operations. For example, the following command creates a new AKS cluster in the `Standard` tier with cost analysis enabled:
8180

8281
```azurecli-interactive
8382
az aks create --resource-group <resource_group> --name <name> --location <location> --enable-managed-identity --generate-ssh-keys --tier standard --enable-cost-analysis
@@ -102,11 +101,13 @@ az aks update --name myAKSCluster --resource-group myResourceGroup --disable-cos
102101
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).
103102

104103
### Cost definitions
105-
In the Kubernetes namespaces and assets views you will see the following charges:
106-
- **Idle charges**: This represents the cost of available resource capacity that wasn't used by any workloads.
107-
- **Service charges**: This represents the charges associated with the service like AKS Uptime SLA, Microsoft Defender for Containers etc.
108-
- **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).
109-
- **Unallocated charges**: This represents the cost of resources that could not be allocated to namespaces.
104+
105+
In the Kubernetes namespaces and assets views you'll see the following charges:
106+
107+
- **Idle charges**: Represents the cost of available resource capacity that wasn't used by any workloads.
108+
- **Service charges**: Represents the charges associated with the service like AKS Uptime SLA, Microsoft Defender for Containers etc.
109+
- **System charges**: 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).
110+
- **Unallocated charges**: Represents the cost of resources that couldn't be allocated to namespaces.
110111

111112
> [!NOTE]
112113
> It might take up to one day for data to finalize. After 24 hours, any fluctuations in costs for the previous day will have stabilized.
@@ -117,9 +118,8 @@ See the following guide to troubleshoot [AKS cost analysis add-on issues](/troub
117118

118119
<!-- LINKS -->
119120
[az-extension-add]: /cli/azure/extension#az-extension-add
120-
[az-feature-register]: /cli/azure/feature#az_feature_register
121-
[az-feature-show]: /cli/azure/feature#az_feature_show
122121
[az-extension-update]: /cli/azure/extension#az-extension-update
123122

124123
## Learn more
125-
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.
124+
125+
Visibility is one element of cost management. Refer to [Optimize Costs in Azure Kubernetes Service (AKS)](./best-practices-cost.md) for other best practices on how to gain control over your kubernetes cost.

0 commit comments

Comments
 (0)