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.
This command group is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
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 | Preview |
az aks namespace delete |
Delete a managed namespace in managed Kubernetes cluster. |
Extension | Preview |
az aks namespace get-credentials |
Get access credentials for a managed namespace. |
Extension | Preview |
az aks namespace list |
List managed namespaces in managed Kubernetes cluster. |
Extension | Preview |
az aks namespace show |
Show the details of a managed namespace in managed Kubernetes cluster. |
Extension | Preview |
az aks namespace update |
Update namespace on the managed Kubernetes cluster. |
Extension | Preview |
az aks namespace add
Command group 'aks namespace' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
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
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Action if Kubernetes namespace with same name already exists. The default value is Never.
Property | Value |
---|---|
Accepted values: | Always, IfIdentical, 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.
Property | Value |
---|---|
Accepted values: | Delete, Keep |
Egress policy for the network. The default value is AllowAll.
Property | Value |
---|---|
Accepted values: | AllowAll, AllowSameNamespace, DenyAll |
Ingress policy for the network. The default value is AllowSameNamespace.
Property | Value |
---|---|
Accepted values: | AllowAll, AllowSameNamespace, DenyAll |
Labels for the managed namespace.
Do not wait for the long-running operation to finish.
Property | Value |
---|---|
Default value: | False |
The tags of the managed namespace.
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
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.
Property | Value |
---|---|
Default value: | False |
az aks namespace delete
Command group 'aks namespace' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
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
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Do not wait for the long-running operation to finish.
Property | Value |
---|---|
Default value: | False |
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
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.
Property | Value |
---|---|
Default value: | False |
az aks namespace get-credentials
Command group 'aks namespace' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
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
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
If specified, overwrite the default context name.
Kubernetes configuration file to update. Use "-" to print YAML to stdout instead.
Property | Value |
---|---|
Default value: | ~\.kube\config |
Overwrite any existing cluster entry with the same name.
Property | Value |
---|---|
Default value: | False |
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Credentials are always in YAML format, so this argument is effectively ignored.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
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.
Property | Value |
---|---|
Default value: | False |
az aks namespace list
Command group 'aks namespace' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
List managed namespaces in managed Kubernetes cluster.
az aks namespace list [--cluster-name]
[--resource-group]
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
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.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
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.
Property | Value |
---|---|
Default value: | False |
az aks namespace show
Command group 'aks namespace' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
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.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
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.
Property | Value |
---|---|
Default value: | False |
az aks namespace update
Command group 'aks namespace' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
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
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Action if Kubernetes namespace with same name already exists.
Property | Value |
---|---|
Accepted values: | Always, IfIdentical, Never |
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.
Property | Value |
---|---|
Accepted values: | Delete, Keep |
Egress policy rule for the network.
Property | Value |
---|---|
Accepted values: | AllowAll, AllowSameNamespace, DenyAll |
Ingress policy rule for the network.
Property | Value |
---|---|
Accepted values: | AllowAll, AllowSameNamespace, DenyAll |
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.
Property | Value |
---|---|
Default value: | False |
The tags of the managed namespace.
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
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.
Property | Value |
---|---|
Default value: | False |