Skip to content

Commit e6ab9ff

Browse files
Merge pull request #278479 from kaysieyu/ky-06172024
Cost analysis CLI and memory limitation updates
2 parents e66f318 + 1268da8 commit e6ab9ff

File tree

1 file changed

+9
-26
lines changed

1 file changed

+9
-26
lines changed

articles/aks/cost-analysis.md

Lines changed: 9 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ author: nickomang
55
ms.author: nickoman
66
ms.service: azure-kubernetes-service
77
ms.subservice: aks-monitoring
8-
ms.custom: ignite-2023, devx-track-azurecli, build-2024
8+
ms.custom: ignite-2023, devx-track-azurecli
99
ms.topic: how-to
10-
ms.date: 05/06/2024
10+
ms.date: 06/17/2024
1111

1212
#CustomerIntent: As a cluster operator, I want to obtain cost management information, perform cost attribution, and improve my cluster footprint
1313
---
@@ -50,21 +50,8 @@ The AKS cost analysis addon is built on top of [OpenCost](https://www.opencost.i
5050

5151
* AKS Automatic is not supported at this time.
5252

53-
* 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.
53+
* If using the Azure CLI, you must have version `2.61.0` or later installed.
5454

55-
### Install or update the `aks-preview` Azure CLI extension
56-
57-
Install the `aks-preview` Azure CLI extension using the [`az extension add`][az-extension-add] command.
58-
59-
```azurecli-interactive
60-
az extension add --name aks-preview
61-
```
62-
63-
If you need to update the extension version, you can do this using the [`az extension update`][az-extension-update] command.
64-
65-
```azurecli-interactive
66-
az extension update --name aks-preview
67-
```
6855

6956
## Enable cost analysis on your AKS cluster
7057

@@ -83,13 +70,7 @@ You can enable the cost analysis with the `--enable-cost-analysis` flag during o
8370
The following example creates a new AKS cluster in the `Standard` tier with cost analysis enabled:
8471

8572
```azurecli-interactive
86-
az aks create \
87-
--resource-group <resource-group> \
88-
--name <cluster-name> \
89-
--location <location> \
90-
--tier standard \
91-
--enable-cost-analysis \
92-
--generate-ssh-keys
73+
az aks create --resource-group <resource-group> --name <cluster-name> --location <location> --enable-managed-identity --generate-ssh-keys --tier standard --enable-cost-analysis
9374
```
9475

9576
The following example updates an existing AKS cluster in the `Standard` tier to enable cost analysis:
@@ -99,7 +80,9 @@ az aks update --resource-group <resource-group> --name <cluster-name> --enable-c
9980
```
10081

10182
> [!WARNING]
102-
> The AKS cost analysis addon Memory usage is dependent on the number of containers deployed. Memory consumption can be roughly approximated by 200MB + 0.5MB per Container. The current memory limit is set to 4GB which will support approximately 7000 containers per cluster but could be more or less depending on various factors. These estimates are subject to change.
83+
> The AKS cost analysis add-on Memory usage is dependent on the number of containers deployed. Memory consumption can be roughly approximated by 200 MB + 0.5 MB per container. The current memory limit is set to 4 GB which will support approximately 7000 containers per cluster. These estimates could be more or less depending on various factors and are subject to change.
84+
>
85+
> If you are experiencing issues such as the add-on pod getting `OOMKilled` or stuck in a `Pending` state, refer to the [AKS cost analysis add-on issues](/troubleshoot/azure/azure-kubernetes/aks-cost-analysis-add-on-issues) troubleshooting guide.
10386
10487
## Disable cost analysis
10588

@@ -110,7 +93,7 @@ az aks update --name myAKSCluster --resource-group myResourceGroup --disable-cos
11093
```
11194

11295
> [!NOTE]
113-
> If you intend to downgrade your cluster from the `Standard` or `Premium` tiers to the `Free` tier while cost analysis is enabled, you must first explicitly disable cost analysis as shown here.
96+
> If you intend to downgrade your cluster from the `Standard` or `Premium` tiers to the `Free` tier while cost analysis is enabled, you must first explicitly disable cost analysis.
11497
11598
## View the cost data
11699

@@ -138,4 +121,4 @@ See the following guide to troubleshoot [AKS cost analysis add-on issues](/troub
138121

139122
## Learn more
140123

141-
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.
124+
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)