Skip to content

az aks namespace update --annotations replaces existing annotations instead of updating incrementally #33490

@bosesuneha

Description

@bosesuneha

Describe the bug

The az aks namespace update --annotations command replaces all existing annotations on a managed namespace with only the values provided via the --annotations parameter.
This behavior prevents users from adding or updating individual annotations without first retrieving and re-specifying the entire existing annotation set.

Related command

az aks namespace update --annotations

Errors

N/A

Issue script & Debug output

Variables

RG=my-resource-group
CLUSTER=my-cluster-name
NS=my-namespace

Step 1: Set initial annotations

az aks namespace update -g $RG --cluster-name $CLUSTER -n $NS --annotations a=1 b=2 --debug

Step 2: Verify annotations

az aks namespace show -g $RG --cluster-name $CLUSTER -n $NS --debug

Step 3: Add a new annotation (expected: merge, actual: replace)

az aks namespace update -g $RG --cluster-name $CLUSTER -n $NS --annotations c=3 --debug

Step 4: Verify annotations again

az aks namespace show -g $RG --cluster-name $CLUSTER -n $NS --debug

Annotations after Step 4:

"annotations": {
"c": "3"
},

Expected behavior

Expected Annotations after Step 4:

"annotations": {
"a": "1",
"b": "2",
"c": "3"
},

Environment Summary

azure-cli 2.87.0

core 2.87.0
telemetry 1.1.0

Extensions:
resource-graph 2.1.1

Dependencies:
msal 1.36.0
azure-mgmt-resource 24.0.0

Python location '/opt/homebrew/Cellar/azure-cli/2.87.0/libexec/bin/python'
Config directory '/Users/sunehabose/.azure'
Extensions directory '/Users/sunehabose/.azure/cliextensions'

Python (Darwin) 3.13.13 (main, Apr 7 2026, 18:19:01) [Clang 21.0.0 (clang-2100.0.123.102)]

Additional context

No response

Metadata

Metadata

Labels

AKSaz aks/acs/openshiftAuto-AssignAuto assign by botBreaking ChangeService AttentionThis issue is responsible by Azure service team.act-observability-squadbugThis issue requires a change to an existing behavior in the product in order to be resolved.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions