Azure / Azure/azure-cli

Cannot set `expander` with multiple parameter in aks cluster autoscaler profile

Open
#29,379 8 comments 0 reactions 0 assignees View on GitHub
act-observability-squad AKS Auto-Assign Auto-Resolve bug customer-reported Service Attention
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

### Describe the bug

Cannot set `expander` with multiple parameter in aks cluster autoscaler profile

### Related command
```bash
az aks update -n ${aks} -g ${rG} -o none \
--cluster-autoscaler-profile expander=priority,least-waste
```

### Errors
```
'least-waste' is an invalid key for cluster-autoscaler-profile. Valid keys are balance-similar-node-groups, expander, max-empty-bulk-delete, max-graceful-termination-sec, max-node-provision-time, max-total-unready-percentage, new-pod-scale-up-delay, ok-total-unready-count, scan-interval, scale-down-delay-after-add, scale-down-delay-after-delete, scale-down-delay-after-failure, scale-down-unneeded-time, scale-down-unready-time, scale-down-utilization-threshold, skip-nodes-with-local-storage, skip-nodes-with-system-pods.
```

### Issue script & Debug output

I don't think this is needed.

### Expected behavior

It should be supported to be configured via `azure-cli`.

### Environment Summary
```
{
"azure-cli": "2.61.0",
"azure-cli-core": "2.61.0",
"azure-cli-telemetry": "1.1.0",
"extensions": {
"ai-examples": "0.2.5",
"ml": "2.26.1",
"ssh": "2.0.3"
}
}
```
### Additional context

In the official FAQ, it is stated that multiple parameters are supported for `expander`. E.g: `--expander=priority,least-waste`.
src: https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#what-are-expanders

It is also possible to be done via ARM template. And I can see the result:
![image](https://github.com/user-attachments/assets/fe1ddaba-53cd-44f5-8a10-b5f688939c3f)

```bash
az aks show -n ${aks} -g ${rG} --query autoScalerProfile.expander
"priority,least-waste"
```

However, it is not possible to be done via az-cli for now as it needs to inlcude `,`.

Also tried the following command, no use:
```bash
joey [ ~ ]$ az aks update -n ${aks} -g ${rG} -o none \
--cluster-autoscaler-profile expander=priority,expander=least-waste
joey [ ~ ]$ az aks show -n ${aks} -g ${rG} --query autoScalerProfile.expander
"least-waste"
```

**Alternative solution considered:**
Support json format as input.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.