Share via


az fleet namespace

Note

This reference is part of the fleet extension for the Azure CLI (version 2.61.0 or higher). The extension will automatically install the first time you run an az fleet 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 fleet managed namespaces.

Commands

Name Description Type Status
az fleet namespace create

Creates a fleet managed namespace.

Extension Preview
az fleet namespace delete

Deletes a fleet managed namespace.

Extension Preview
az fleet namespace get-credentials

Get kubeconfig for a fleet namespace, with the namespace context pre-configured.

Extension Preview
az fleet namespace list

Lists a fleet's managed namespaces.

Extension Preview
az fleet namespace show

Gets a fleet managed namespace.

Extension Preview
az fleet namespace update

Updates a fleet managed namespace.

Extension Preview
az fleet namespace wait

Wait for a fleet managed namespace to reach a desired state.

Extension Preview

az fleet namespace create

Preview

Command group 'fleet namespace' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Creates a fleet managed namespace.

az fleet namespace create --fleet-name
                          --name
                          --resource-group
                          [--adoption-policy {Always, IfIdentical, Never}]
                          [--annotations]
                          [--cpu-limits]
                          [--cpu-requests]
                          [--delete-policy {Delete, Keep}]
                          [--egress-policy {AllowAll, AllowSameNamespace, DenyAll}]
                          [--ingress-policy {AllowAll, AllowSameNamespace, DenyAll}]
                          [--labels]
                          [--member-cluster-names]
                          [--memory-limits]
                          [--memory-requests]
                          [--no-wait]
                          [--tags]

Examples

Create a basic fleet managed namespace.

az fleet namespace create -g MyFleetResourceGroup -f MyFleetName -n MyManagedNamespace

Create a fleet managed namespace with tags.

az fleet namespace create -g MyFleetResourceGroup -f MyFleetName -n MyManagedNamespace --tags environment=production key=value

Create a fleet managed namespace with resource limits and policies.

az fleet namespace create -g MyFleetResourceGroup -f MyFleetName -n MyManagedNamespace --annotations key=value --labels key=value --cpu-requests 1m --cpu-limits 4m --memory-requests 1Mi --memory-limits 4Mi --ingress-policy AllowAll --egress-policy DenyAll --delete-policy Keep --adoption-policy Never

Create a fleet managed namespace on specific member clusters.

az fleet namespace create -g MyFleetResourceGroup -f MyFleetName -n MyManagedNamespace --member-cluster-names team-01 team-02 team-03 team-04

Required Parameters

--fleet-name -f

Name of the fleet.

--name -n

The name of the Kubernetes namespace to be created on member clusters.

--resource-group -g

Name of the 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.

--adoption-policy

Adoption policy for the namespace.

Property Value
Default value: Never
Accepted values: Always, IfIdentical, Never
--annotations

Space-separated annotations in key=value format. Example: env=production region=us-west team=devops.

--cpu-limits

CPU limits for the namespace. Example: 1000m.

--cpu-requests

CPU requests for the namespace. Example: 1000m.

--delete-policy

Delete policy for the namespace.

Property Value
Default value: Keep
Accepted values: Delete, Keep
--egress-policy

Egress policy for the namespace.

Property Value
Accepted values: AllowAll, AllowSameNamespace, DenyAll
--ingress-policy

Ingress policy for the namespace.

Property Value
Accepted values: AllowAll, AllowSameNamespace, DenyAll
--labels

Space-separated labels in key=value format. Example: env=production region=us-west team=devops.

--member-cluster-names

Space-separated list of member cluster names to apply the namespace to.

--memory-limits

Memory limits for the namespace. Example: 500Mi.

--memory-requests

Memory requests for the namespace. Example: 500Mi.

--no-wait

Do not wait for the long-running operation to finish.

Property Value
Default value: False
--tags

Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az fleet namespace delete

Preview

Command group 'fleet namespace' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Deletes a fleet managed namespace.

az fleet namespace delete --fleet-name
                          --name
                          --resource-group
                          [--no-wait]
                          [--yes]

Examples

Delete a specific managed namespace.

az fleet namespace delete -g MyFleetResourceGroup -f MyFleetName -n MyManagedNamespace

Required Parameters

--fleet-name -f

Name of the fleet.

--name -n

Name of the managed namespace.

--resource-group -g

Name of the 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.

--no-wait

Do not wait for the long-running operation to finish.

Property Value
Default value: False
--yes -y

Do not prompt for confirmation.

Property Value
Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az fleet namespace get-credentials

Preview

Command group 'fleet namespace' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Get kubeconfig for a fleet namespace, with the namespace context pre-configured.

az fleet namespace get-credentials --fleet-name
                                   --name
                                   --resource-group
                                   [--context]
                                   [--file]
                                   [--member]
                                   [--overwrite-existing]

Examples

Get kubeconfig for a fleet namespace from the hub cluster.

az fleet namespace get-credentials -g MyFleetResourceGroup -f MyFleetName -n MyManagedNamespace

Get kubeconfig for a fleet namespace from a specific fleet member.

az fleet namespace get-credentials -g MyFleetResourceGroup -f MyFleetName -n MyManagedNamespace --member MyFleetMember

Save kubeconfig to a specific file.

az fleet namespace get-credentials -g MyFleetResourceGroup -f MyFleetName -n MyManagedNamespace --file ~/my-namespace-config

Required Parameters

--fleet-name -f

Name of the fleet.

--name -n

Specify the managed namespace name.

--resource-group -g

Name of the 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.

--context

If specified, overwrite the default context name.

--file

Kubernetes configuration file to update. Use "-" to print YAML to stdout instead.

Property Value
Default value: ~\.kube\config
--member -m

Specify the fleet member name to get credentials from its associated managed cluster.

--overwrite-existing

Overwrite any existing cluster entry with the same name.

Property Value
Default value: True
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az fleet namespace list

Preview

Command group 'fleet namespace' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Lists a fleet's managed namespaces.

az fleet namespace list --fleet-name
                        --resource-group

Examples

List all managed namespaces for a given fleet.

az fleet namespace list -g MyFleetResourceGroup -f MyFleetName

Required Parameters

--fleet-name -f

Name of the fleet.

--resource-group -g

Name of the resource group.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az fleet namespace show

Preview

Command group 'fleet namespace' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Gets a fleet managed namespace.

az fleet namespace show --fleet-name
                        --name
                        --resource-group

Examples

Show the details of a specific managed namespace.

az fleet namespace show -g MyFleetResourceGroup -f MyFleetName -n MyManagedNamespace

Required Parameters

--fleet-name -f

Name of the fleet.

--name -n

Name of the managed namespace.

--resource-group -g

Name of the resource group.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az fleet namespace update

Preview

Command group 'fleet namespace' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Updates a fleet managed namespace.

az fleet namespace update --fleet-name
                          --name
                          --resource-group
                          [--no-wait]
                          [--tags]

Examples

Updates a fleet managed namespace.

az fleet namespace update -g MyFleetResourceGroup -f MyFleetName -n MyManagedNamespace

Update tags for a fleet managed namespace.

az fleet namespace update -g MyFleetResourceGroup -f MyFleetName -n MyManagedNamespace --tags environment=production

Required Parameters

--fleet-name -f

Name of the fleet.

--name -n

Name of the managed namespace.

--resource-group -g

Name of the 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.

--no-wait

Do not wait for the long-running operation to finish.

Property Value
Default value: False
--tags

Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az fleet namespace wait

Preview

Command group 'fleet namespace' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Wait for a fleet managed namespace to reach a desired state.

If an operation on a fleet managed namespace was interrupted or was started with --no-wait, use this command to wait for it to complete.

az fleet namespace wait --fleet-name
                        --name
                        --resource-group
                        [--created]
                        [--custom]
                        [--deleted]
                        [--exists]
                        [--interval]
                        [--timeout]
                        [--updated]

Required Parameters

--fleet-name -f

Name of the fleet.

--name -n

Name of the managed namespace.

--resource-group -g

Name of the 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.

--created

Wait until created with 'provisioningState' at 'Succeeded'.

Property Value
Parameter group: Wait Condition Arguments
Default value: False
--custom

Wait until the condition satisfies a custom JMESPath query. E.g. provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running'].

Property Value
Parameter group: Wait Condition Arguments
--deleted

Wait until deleted.

Property Value
Parameter group: Wait Condition Arguments
Default value: False
--exists

Wait until the resource exists.

Property Value
Parameter group: Wait Condition Arguments
Default value: False
--interval

Polling interval in seconds.

Property Value
Parameter group: Wait Condition Arguments
Default value: 30
--timeout

Maximum wait in seconds.

Property Value
Parameter group: Wait Condition Arguments
Default value: 3600
--updated

Wait until updated with provisioningState at 'Succeeded'.

Property Value
Parameter group: Wait Condition Arguments
Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False