Skip to content

Commit 9dfe0ca

Browse files
authored
Update troubleshoot-managed-namespaces.md
Edit review per CI 7012
1 parent 3f725a0 commit 9dfe0ca

File tree

1 file changed

+71
-27
lines changed

1 file changed

+71
-27
lines changed

support/azure/azure-kubernetes/extensions/troubleshoot-managed-namespaces.md

Lines changed: 71 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,108 @@
11
---
22
title: Troubleshoot Managed Namespaces Errors
3-
description: Learn how to resolve errors that occur when you try to enable Managed Namespaces on AKS.
3+
description: Learn how to resolve errors that occur when you try to enable managed namespaces on AKS.
44
ms.date: 08/05/2025
55
ms.reviewer: jackjiang
66
ms.service: azure-kubernetes-service
77
ms.custom: sap:Extensions, references_regions
88
---
9-
# Troubleshoot Managed Namespace Errors
9+
# Troubleshoot managed namespace errors
1010

11-
This article provides guidance on resolving errors when using Managed Namespaces (Preview) on Microsoft Azure Kubernetes Service (AKS).
11+
This article provides guidance for resolving errors that occur in Microsoft Azure Kubernetes Service (AKS) when you use the `ManagedNamespacePreview` flag.
1212

1313
## Prerequisites
1414

15-
Please make sure the following tools are installed and configured:
15+
The following tools must be installed and configured:
1616

1717
- [Azure CLI](/cli/azure/install-azure-cli)
1818
- [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/), the Kubernetes command-line client
1919

20-
## Issue 1 - I get a `FeatureNotFound` error when I try to registry the managed namespace flag
21-
22-
If you receive an error like `(FeatureNotFound) The feature '<feature_name>' could not be found.`
20+
## Error 1: Feature not found
2321

24-
Please ensure that the command is entered properly and the spelling is correct.
22+
### Symptom
2523

26-
You can run az feature register command to register this preview feature.
24+
When you try to register the `ManagedNamespacePreview` flag, you receive the following error message:
2725

28-
`az feature register --namespace Microsoft.containerService -n ManagedNamespacePreview`
26+
*(FeatureNotFound) The feature '<feature_name>' could not be found.*
2927

30-
## Issue 2 - I get an error when I try to create a managed namespace or I'm unable to create a managed namespace.
28+
### Resolution
3129

32-
If you get a `(BadRequest) Managed namespace requires feature flag Microsoft.ContainerService/ManagedNamespacePreview to be registered.` error, that means the feature flag is not yet registered. If you're already ran the command to register the flag, verify the registration status
30+
Make sure that the command is entered correctly and uses correct spelling.
31+
32+
To register this preview feature, run the `as feature register` command:
33+
34+
`az feature register --namespace Microsoft.containerService -n ManagedNamespacePreview`
3335

34-
To verify the registration status, use the az feature show command.
36+
## Error 2 - Can't create a managed namespace
37+
38+
### Symptom
39+
40+
When you try to create a managed namespace, you receive the following error message:
41+
42+
*(BadRequest) Managed namespace requires feature flag Microsoft.ContainerService/ManagedNamespacePreview to be registered.*
43+
44+
### Resolution
45+
46+
This message indicates that the feature flag is not yet registered. If you already ran the command to register the flag, verify the registration status by running the the `az feature show` command:
3547

3648
`az feature show --namespace Microsoft.ContainerService -n ManagedNamespacePreview`
3749

38-
## Issue 3 - Some namespaces can't be changed/certain names can't be used
50+
## Error 3: Can't use or change some namespaces
3951

40-
Users are not allowed to make change on certain namespaces or create a managed namespaces under certain names, as they are utilized by system components/resources. These namespaces are:
52+
### Symptom
4153

42-
default, kube-system, kube-node-lease, kube-public, gatekeeper-system, cert-manager, calico-system, tigera-system, app-routing-system,aks-istio-system, istio-system, dapr-system, flux-system, prometheus-system, eraser-system
54+
You receive the following error message:
4355

44-
If a user attempts to create a namespace using one of these names, they will receive an error stating `The namespace name cannot be the same as the name of a system namespace.`.
56+
*The namespace name cannot be the same as the name of a system namespace.*
4557

46-
## Issue 4 - I can't update or delete my namespaces
58+
### Resolution
4759

48-
Users are not allowed to create, update, or delete managed namespaces when the managed cluster is not in a running state. This behavior is expected and normal.
60+
Users are not allowed to change certain namespaces or create managed namespaces that use certain names because the names are used by system components or resources. This list includes the following namespaces:
4961

50-
## Issue 5 - I can't ______ via `kubectl`
62+
- default
63+
- kube-system
64+
- kube-node-lease
65+
- kube-public
66+
- gatekeeper-system
67+
- cert-manager
68+
- calico-system
69+
- tigera-system
70+
- app-routing-system
71+
- aks-istio-system
72+
- istio-system
73+
- dapr-system
74+
- flux-system
75+
- prometheus-system
76+
- eraser-system
5177

52-
Since the managed namespace is managed by Microsoft Azure Resource Manager (ARM), changes to its metadata (e.g. labels/annotations) are restricted. Kubectl commands that are not allowed are inclusive of, but not limited to editing or deleting:
78+
## Error 4 - Can't update or delete managed namespaces
5379

54-
- A managed namespace via `kubectl edit ns <namespace-name>` or `kubectl delete ns <namespace name>`
55-
- A namespace via `kubectl delete resourcequota defaultresourcequota --namespace <namespace-name>`
56-
- A defaultresourcequota via `kubectl delete resourcequota defaultresourcequota --namespace <namespace-name>`
57-
- A defaultnetworkpolicy via `kubectl delete networkpolicy defaultnetworkpolicy --namespace <namespace-name>`
80+
### Symptom
81+
82+
You can't create, update, or delete managed namespaces.
83+
84+
### Resolution
85+
86+
This behavior is by design. Users are not allowed to create, update, or delete managed namespaces if the managed cluster is not in a running state.
87+
88+
## Error 5: Can't use some kubectl commands
89+
90+
### Symptom
91+
92+
When you try to modify a managed namespace through kubectl, you receive the following error message:
93+
94+
*Updating resource quota defaultresourcequota is not allowed because it is managed by ARM. Please update this resource quota though ARM api.*
95+
96+
### Resolution
97+
98+
Because a managed namespace is managed by Microsoft Azure Resource Manager (ARM), changes to its metadata (labels and annotations) through kubectl commands are restricted. The affected actions include, but are not limited to, edits and deletions to:
5899

59-
When attempting any action that modifies a managed namespace via kubectl, users will the error `Updating resource quota defaultresourcequota is not allowed because it is managed by ARM. Please update this resource quota though ARM api.`
100+
- A managed namespace through `kubectl edit ns <namespace-name>` or `kubectl delete ns <namespace name>`
101+
- A namespace through `kubectl delete resourcequota defaultresourcequota --namespace <namespace-name>`
102+
- A defaultresourcequota through `kubectl delete resourcequota defaultresourcequota --namespace <namespace-name>`
103+
- A defaultnetworkpolicy through `kubectl delete networkpolicy defaultnetworkpolicy --namespace <namespace-name>`
60104

61-
Modifications must be made through the ARM API to ensure consistency with the managed state. Users can manage their managed namespaces in the Azure portal, or via [CLI commands](/cli/azure/aks/namespace)
105+
Modifications to namespaces must be made through the ARM API to maintain consistency with the managed state. You can manage your managed namespaces in the Azure portal or through [CLI commands](/cli/azure/aks/namespace).
62106

63107
[!INCLUDE [Third-party disclaimer](../../../includes/third-party-disclaimer.md)]
64108

0 commit comments

Comments
 (0)