az aks namespace
Note
This reference is part of the aks-preview extension for the Azure CLI (version 2.61.0 or higher). The extension will automatically install the first time you run an az aks namespace command. Learn more about extensions.
Commands to manage namespace in managed Kubernetes cluster.
Commands
| Name | Description | Type | Status |
|---|---|---|---|
| az aks namespace add |
Add namespace to the managed Kubernetes cluster. |
Extension | GA |
| az aks namespace delete |
Delete a managed namespace in managed Kubernetes cluster. |
Extension | GA |
| az aks namespace get-credentials |
Get access credentials for a managed namespace. |
Extension | GA |
| az aks namespace list |
List managed namespaces in managed Kubernetes cluster. |
Extension | GA |
| az aks namespace show |
Show the details of a managed namespace in managed Kubernetes cluster. |
Extension | GA |
| az aks namespace update |
Update namespace on the managed Kubernetes cluster. |
Extension | GA |
az aks namespace add
Add namespace to the managed Kubernetes cluster.
az aks namespace add --cluster-name
--cpu-limit
--cpu-request
--memory-limit
--memory-request
--name
--resource-group
[--adoption-policy {Always, IfIdentical, Never}]
[--aks-custom-headers]
[--annotations]
[--delete-policy {Delete, Keep}]
[--egress-policy {AllowAll, AllowSameNamespace, DenyAll}]
[--ingress-policy {AllowAll, AllowSameNamespace, DenyAll}]
[--labels]
[--no-wait]
[--tags]
Examples
Create a namespace in an existing AKS cluster.
az aks namespace add -g MyResourceGroup --cluster-name MyClusterName --name NamespaceName --cpu-request 500m --cpu-limit 800m --memory-request 1Gi --memory-limit 2Gi --aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/ManagedNamespacePreview
Create a namespace in an existing AKS cluster with labels, annotations and tags
az aks namespace add -g MyResourceGroup --cluster-name MyClusterName --name NamespaceName --labels a=b p=q --annotations a=b p=q --tags a=b p=q --cpu-request 500m --cpu-limit 800m --memory-request 1Gi --memory-limit 2Gi --aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/ManagedNamespacePreview
Required Parameters
Name of the managed cluster.
CPU limit of the namespace.
CPU request of the namespace.
Memory limit of the namespace.
Memory request of the namespace.
The managed namespace name.
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
Optional Parameters
Action if Kubernetes namespace with same name already exists. The default value is Never.
Send custom headers. When specified, format should be Key1=Value1,Key2=Value2.
Annotations for the managed namespace.
Delete options of a namespace. The default value is Keep.
Egress policy for the network. The default value is AllowAll.
Ingress policy for the network. The default value is AllowSameNamespace.
Labels for the managed namespace.
Do not wait for the long-running operation to finish.
The tags of the managed namespace.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
Increase logging verbosity. Use --debug for full debug logs.
az aks namespace delete
Delete a managed namespace in managed Kubernetes cluster.
az aks namespace delete --cluster-name
--name
--resource-group
[--no-wait]
Required Parameters
The cluster name.
The managed namespace name.
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
Optional Parameters
Do not wait for the long-running operation to finish.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
Increase logging verbosity. Use --debug for full debug logs.
az aks namespace get-credentials
Get access credentials for a managed namespace.
az aks namespace get-credentials --cluster-name
--name
--resource-group
[--context]
[--file]
[--overwrite-existing]
Examples
Get access credentials for a managed namespace. (autogenerated)
az aks namespace get-credentials --resource-group MyResourceGroup --cluster-name MyManagedCluster --name ManagedNamespaceName
Required Parameters
The cluster name.
The managed namespace name.
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
Optional Parameters
If specified, overwrite the default context name.
Kubernetes configuration file to update. Use "-" to print YAML to stdout instead.
Overwrite any existing cluster entry with the same name.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
Increase logging verbosity. Use --debug for full debug logs.
az aks namespace list
List managed namespaces in managed Kubernetes cluster.
az aks namespace list [--cluster-name]
[--resource-group]
Optional Parameters
The cluster name.
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
Increase logging verbosity. Use --debug for full debug logs.
az aks namespace show
Show the details of a managed namespace in managed Kubernetes cluster.
az aks namespace show --cluster-name
--name
--resource-group
Required Parameters
The cluster name.
The managed namespace name.
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
Increase logging verbosity. Use --debug for full debug logs.
az aks namespace update
Update namespace on the managed Kubernetes cluster.
az aks namespace update --cluster-name
--name
--resource-group
[--adoption-policy {Always, IfIdentical, Never}]
[--aks-custom-headers]
[--annotations]
[--cpu-limit]
[--cpu-request]
[--delete-policy {Delete, Keep}]
[--egress-policy {AllowAll, AllowSameNamespace, DenyAll}]
[--ingress-policy {AllowAll, AllowSameNamespace, DenyAll}]
[--labels]
[--memory-limit]
[--memory-request]
[--no-wait]
[--tags]
Examples
update namespace in an existing AKS cluster.
az aks namespace update -g MyResourceGroup --cluster-name MyClusterName --name NamespaceName --labels a=b p=q --annotations a=b p=q --tags a=b p=q --cpu-request 600m --cpu-limit 800m --memory-request 2Gi --memory-limit 3Gi --adoption-policy Always --aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/ManagedNamespacePreview
Required Parameters
Name of the managed cluster.
The managed namespace name.
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
Optional Parameters
Action if Kubernetes namespace with same name already exists.
Send custom headers. When specified, format should be Key1=Value1,Key2=Value2.
Annotations for the managed namespace.
CPU limit of the namespace.
CPU request of the namespace.
Delete options of a namespace.
Egress policy rule for the network.
Ingress policy rule for the network.
Labels for the managed namespace.
Memory limit of the namespace.
Memory request of the namespace.
Do not wait for the long-running operation to finish.
The tags of the managed namespace.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
Increase logging verbosity. Use --debug for full debug logs.