az k8s-extension

Note

This reference is part of the k8s-extension extension for the Azure CLI (version 2.51.0 or higher). The extension will automatically install the first time you run an az k8s-extension command. Learn more about extensions.

Commands to manage Kubernetes Extensions.

Commands

Name Description Type Status
az k8s-extension create

Create a Kubernetes Cluster Extension, including purchasing an extension Offer from Azure Marketplace (AKS only). Please refer to the example at the end to see how to create an extension or purchase an extension offer.

Extension GA
az k8s-extension delete

Delete a Kubernetes Extension.

Extension GA
az k8s-extension extension-types

Commands to discover Kubernetes Extension Types.

Extension Preview
az k8s-extension extension-types list

List available Cluster Extension Types for an existing cluster.

Extension Preview and Deprecated
az k8s-extension extension-types list-by-cluster

List available Cluster Extension Types for an existing cluster. The properties used for filtering include type of cluster (managed, connected, etc), kubernetes version, location of the cluster.

Extension Preview
az k8s-extension extension-types list-by-location

List available Cluster Extension Types in a region.

Extension Preview
az k8s-extension extension-types list-versions

List available versions for a Cluster Extension Type for a given cluster.

Extension Preview and Deprecated
az k8s-extension extension-types list-versions-by-cluster

List available versions for a Cluster Extension Type for a given cluster. The properties used for filtering include type of cluster (managed, connected, etc), kubernetes version, location of the cluster.

Extension Preview
az k8s-extension extension-types list-versions-by-location

List available versions for a Cluster Extension Type versions in a region.

Extension Preview
az k8s-extension extension-types show

Get properties for a Cluster Extension Type in a region.

Extension Preview and Deprecated
az k8s-extension extension-types show-by-cluster

Show properties for a Cluster Extension Type for an existing cluster. The properties used for filtering include type of cluster (managed, connected, etc), kubernetes version, location of the cluster.

Extension Preview
az k8s-extension extension-types show-by-location

Show properties for a Cluster Extension Type in a region.

Extension Preview
az k8s-extension extension-types show-version-by-cluster

Show properties associated with a Cluster Extension Type version for an existing cluster. The properties used for filtering include type of cluster (managed, connected, etc), kubernetes version, location of the cluster.

Extension Preview
az k8s-extension extension-types show-version-by-location

Show properties associated with a Cluster Extension Type version in a region.

Extension Preview
az k8s-extension list

List Kubernetes Extensions.

Extension GA
az k8s-extension show

Show a Kubernetes Extension.

Extension GA
az k8s-extension update

Update mutable properties of a Kubernetes Extension.

Extension GA

az k8s-extension create

Create a Kubernetes Cluster Extension, including purchasing an extension Offer from Azure Marketplace (AKS only). Please refer to the example at the end to see how to create an extension or purchase an extension offer.

Create a Kubernetes Extension. The output includes secrets that you must protect. Be sure that you do not include these secrets in your source control. Also verify that no secrets are present in the logs of your command or script. For additional information, see http://aka.ms/clisecrets.

az k8s-extension create --cluster-name
                        --cluster-type {appliances, connectedClusters, managedClusters, provisionedClusters}
                        --extension-type
                        --name
                        --resource-group
                        [--auto-upgrade {false, true}]
                        [--cluster-resource-provider]
                        [--config]
                        [--config-file]
                        [--config-protected]
                        [--config-protected-file]
                        [--config-settings]
                        [--configuration-protected-settings]
                        [--configuration-protected-settings-file]
                        [--configuration-settings-file]
                        [--no-wait]
                        [--plan-name]
                        [--plan-product]
                        [--plan-publisher]
                        [--release-namespace]
                        [--release-train]
                        [--scope {cluster, namespace}]
                        [--target-namespace]
                        [--version]

Examples

Create a Kubernetes Extension

az k8s-extension create --resource-group my-resource-group --cluster-name mycluster --cluster-type connectedClusters --name myextension --extension-type microsoft.openservicemesh --scope cluster --release-train stable

Create a Kubernetes Marketplace Extension

az k8s-extension create --resource-group my-resource-group --cluster-name mycluster --cluster-type managedClusters --name myextension --extension-type Contoso.AzureVoteKubernetesAppTest --scope cluster --release-train stable --plan-name testplan --plan-product kubernetest_apps_demo_offer --plan-publisher test_test_mix3pptest0011614206850774

Required Parameters

--cluster-name -c

Name of the Kubernetes cluster.

--cluster-type -t

Specify Arc clusters or AKS managed clusters or Arc appliances or provisionedClusters.

accepted values: appliances, connectedClusters, managedClusters, provisionedClusters
--extension-type

Name of the extension type.

--name -n

Name of the extension instance.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--auto-upgrade --auto-upgrade-minor-version

Automatically upgrade minor version of the extension instance.

accepted values: false, true
--cluster-resource-provider --cluster-rp

Cluster Resource Provider name for this clusterType (Required for provisionedClusters).

--config --configuration-settings

Configuration Settings as key=value pair. Repeat parameter for each setting. Do not use this for secrets, as this value is returned in response.

--config-file --config-settings-file

JSON file path for configuration-settings.

--config-protected --config-protected-settings

Configuration Protected Settings as key=value pair. Repeat parameter for each setting. Only the key is returned in response, the value is not.

--config-protected-file --config-protected-settings-file

JSON file path for configuration-protected-settings.

--config-settings
Deprecated

Option '--config-settings' has been deprecated and will be removed in a future release. Use '--configuration-settings' instead.

Configuration Settings as key=value pair. Repeat parameter for each setting. Do not use this for secrets, as this value is returned in response.

--configuration-protected-settings
Deprecated

Option '--configuration-protected-settings' has been deprecated and will be removed in a future release. Use '--config-protected-settings' instead.

Configuration Protected Settings as key=value pair. Repeat parameter for each setting. Only the key is returned in response, the value is not.

--configuration-protected-settings-file
Deprecated

Option '--configuration-protected-settings-file' has been deprecated and will be removed in a future release. Use '--config-protected-file' instead.

JSON file path for configuration-protected-settings.

--configuration-settings-file
Deprecated

Option '--configuration-settings-file' has been deprecated and will be removed in a future release. Use '--config-settings-file' instead.

JSON file path for configuration-settings.

--no-wait

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

default value: False
--plan-name

The plan name is referring to the Plan ID of the extension that is being taken from Marketplace portal under Usage Information + Support.

--plan-product

The plan product is referring to the Product ID of the extension that is being taken from Marketplace portal under Usage Information + Support. An example of this is the name of the ISV offering used.

--plan-publisher

The plan publisher is referring to the Publisher ID of the extension that is being taken from Marketplace portal under Usage Information + Support.

--release-namespace

Specify the namespace to install the extension release.

--release-train

Specify the release train for the extension type.

--scope

Specify the extension scope.

accepted values: cluster, namespace
--target-namespace

Specify the target namespace to install to for the extension instance. This parameter is required if extension scope is set to 'namespace'.

--version

Specify the version to install for the extension instance if --auto-upgrade-minor-version is not enabled.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--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.

az k8s-extension delete

Delete a Kubernetes Extension.

az k8s-extension delete --cluster-name
                        --cluster-type {appliances, connectedClusters, managedClusters, provisionedClusters}
                        --name
                        --resource-group
                        [--cluster-resource-provider]
                        [--force]
                        [--no-wait]
                        [--yes]

Examples

Delete an existing Kubernetes Extension

az k8s-extension delete --resource-group my-resource-group --cluster-name mycluster --cluster-type connectedClusters --name myextension

Required Parameters

--cluster-name -c

Name of the Kubernetes cluster.

--cluster-type -t

Specify Arc clusters or AKS managed clusters or Arc appliances or provisionedClusters.

accepted values: appliances, connectedClusters, managedClusters, provisionedClusters
--name -n

Name of the extension instance.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--cluster-resource-provider --cluster-rp

Cluster Resource Provider name for this clusterType (Required for provisionedClusters).

--force

Specify whether to force delete the extension from the cluster.

default value: False
--no-wait

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

default value: False
--yes -y

Ignore confirmation prompts.

default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--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.

az k8s-extension list

List Kubernetes Extensions.

List all Kubernetes Extensions in a cluster, including their properties. The output includes secrets that you must protect. Be sure that you do not include these secrets in your source control. Also verify that no secrets are present in the logs of your command or script. For additional information, see http://aka.ms/clisecrets.

az k8s-extension list --cluster-name
                      --cluster-type {appliances, connectedClusters, managedClusters, provisionedClusters}
                      --resource-group
                      [--cluster-resource-provider]

Examples

List all Kubernetes Extensions on a cluster

az k8s-extension list --resource-group my-resource-group --cluster-name mycluster --cluster-type connectedClusters

Required Parameters

--cluster-name -c

Name of the Kubernetes cluster.

--cluster-type -t

Specify Arc clusters or AKS managed clusters or Arc appliances or provisionedClusters.

accepted values: appliances, connectedClusters, managedClusters, provisionedClusters
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--cluster-resource-provider --cluster-rp

Cluster Resource Provider name for this clusterType (Required for provisionedClusters).

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--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.

az k8s-extension show

Show a Kubernetes Extension.

Show a Kubernetes Extension including its properties. The output includes secrets that you must protect. Be sure that you do not include these secrets in your source control. Also verify that no secrets are present in the logs of your command or script. For additional information, see http://aka.ms/clisecrets.

az k8s-extension show --cluster-name
                      --cluster-type {appliances, connectedClusters, managedClusters, provisionedClusters}
                      --name
                      --resource-group
                      [--cluster-resource-provider]

Examples

Show details of a Kubernetes Extension

az k8s-extension show --resource-group my-resource-group --cluster-name mycluster --cluster-type connectedClusters --name myextension

Required Parameters

--cluster-name -c

Name of the Kubernetes cluster.

--cluster-type -t

Specify Arc clusters or AKS managed clusters or Arc appliances or provisionedClusters.

accepted values: appliances, connectedClusters, managedClusters, provisionedClusters
--name -n

Name of the extension instance.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--cluster-resource-provider --cluster-rp

Cluster Resource Provider name for this clusterType (Required for provisionedClusters).

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--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.

az k8s-extension update

Update mutable properties of a Kubernetes Extension.

For update to ConfigSettings and ConfigProtectedSettings, please refer to documentation of the cluster extension service to check update to these properties is supported before updating these properties. The output includes secrets that you must protect. Be sure that you do not include these secrets in your source control. Also verify that no secrets are present in the logs of your command or script. For additional information, see http://aka.ms/clisecrets.

az k8s-extension update --cluster-name
                        --cluster-type {appliances, connectedClusters, managedClusters, provisionedClusters}
                        --name
                        --resource-group
                        [--auto-upgrade {false, true}]
                        [--cluster-resource-provider]
                        [--config]
                        [--config-file]
                        [--config-protected]
                        [--config-protected-file]
                        [--config-settings]
                        [--configuration-protected-settings]
                        [--configuration-protected-settings-file]
                        [--configuration-settings-file]
                        [--no-wait]
                        [--release-train]
                        [--version]
                        [--yes]

Examples

Update a Kubernetes Extension

az k8s-extension update --resource-group my-resource-group --cluster-name mycluster --cluster-type connectedClusters --name myextension --auto-upgrade true/false --version extension-version --release-train stable --configuration-settings settings-key=settings-value --config-protected-settings protected-settings-key=protected-value --config-settings-file=config-settings-file --config-protected-file=protected-settings-file

Required Parameters

--cluster-name -c

Name of the Kubernetes cluster.

--cluster-type -t

Specify Arc clusters or AKS managed clusters or Arc appliances or provisionedClusters.

accepted values: appliances, connectedClusters, managedClusters, provisionedClusters
--name -n

Name of the extension instance.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--auto-upgrade --auto-upgrade-minor-version

Automatically upgrade minor version of the extension instance.

accepted values: false, true
--cluster-resource-provider --cluster-rp

Cluster Resource Provider name for this clusterType (Required for provisionedClusters).

--config --configuration-settings

Configuration Settings as key=value pair. Repeat parameter for each setting. Do not use this for secrets, as this value is returned in response.

--config-file --config-settings-file

JSON file path for configuration-settings.

--config-protected --config-protected-settings

Configuration Protected Settings as key=value pair. Repeat parameter for each setting. Only the key is returned in response, the value is not.

--config-protected-file --config-protected-settings-file

JSON file path for configuration-protected-settings.

--config-settings
Deprecated

Option '--config-settings' has been deprecated and will be removed in a future release. Use '--configuration-settings' instead.

Configuration Settings as key=value pair. Repeat parameter for each setting. Do not use this for secrets, as this value is returned in response.

--configuration-protected-settings
Deprecated

Option '--configuration-protected-settings' has been deprecated and will be removed in a future release. Use '--config-protected-settings' instead.

Configuration Protected Settings as key=value pair. Repeat parameter for each setting. Only the key is returned in response, the value is not.

--configuration-protected-settings-file
Deprecated

Option '--configuration-protected-settings-file' has been deprecated and will be removed in a future release. Use '--config-protected-file' instead.

JSON file path for configuration-protected-settings.

--configuration-settings-file
Deprecated

Option '--configuration-settings-file' has been deprecated and will be removed in a future release. Use '--config-settings-file' instead.

JSON file path for configuration-settings.

--no-wait

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

default value: False
--release-train

Specify the release train for the extension type.

--version

Specify the version to install for the extension instance if --auto-upgrade-minor-version is not enabled.

--yes -y

Ignore confirmation prompts.

default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--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.