Skip to content

Commit 2de0d79

Browse files
authored
Merge pull request #230522 from JnHs/jh-arck8-extht3
update topic
2 parents fb9c6ba + ce4a21e commit 2de0d79

File tree

3 files changed

+49
-54
lines changed

3 files changed

+49
-54
lines changed

articles/azure-arc/kubernetes/extensions.md

Lines changed: 39 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,46 @@
11
---
2-
title: "Azure Arc-enabled Kubernetes cluster extensions"
2+
title: "Deploy and manage Azure Arc-enabled Kubernetes cluster extensions"
33
ms.custom: event-tier1-build-2022, ignite-2022
44
ms.date: 03/08/2023
55
ms.topic: how-to
6-
description: "Deploy and manage lifecycle of extensions on Azure Arc-enabled Kubernetes clusters."
6+
description: "Create and manage extension instances on Azure Arc-enabled Kubernetes clusters."
77
---
88

99
# Deploy and manage Azure Arc-enabled Kubernetes cluster extensions
1010

11-
The Kubernetes extensions feature enables the following on Azure Arc-enabled Kubernetes clusters:
12-
13-
* Azure Resource Manager-based deployment of cluster extension.
14-
* Lifecycle management of extension Helm charts.
15-
16-
In this article, you learn:
17-
> [!div class="checklist"]
18-
19-
> * How to create extension instances.
20-
> * Required and optional parameters.
21-
> * How to view, list, update, and delete extension instances.
11+
You can create extension instances in an Arc-enabled Kubernetes cluster, setting required and optional parameters including options related to updates and configurations. You can also view, list, update, and delete extension instances.
2212

2313
Before you begin, read the [conceptual overview of Arc-enabled Kubernetes cluster extensions](conceptual-extensions.md) and review the [list of currently available extensions](extensions-release.md).
2414

2515
## Prerequisites
2616

27-
* [Install or upgrade Azure CLI](/cli/azure/install-azure-cli) to the latest version.
28-
* Install the latest version of the `connectedk8s` and `k8s-extension` Azure CLI extensions by running the following commands:
17+
* The latest version of [Azure CLI](/cli/azure/install-azure-cli).
18+
* The latest versions of the `connectedk8s` and `k8s-extension` Azure CLI extensions. Install these extensions by running the following commands:
2919

3020
```azurecli
3121
az extension add --name connectedk8s
3222
az extension add --name k8s-extension
3323
```
3424
35-
If the `connectedk8s` and `k8s-extension` extension are already installed, you can update them to the latest version using the following command:
25+
If the `connectedk8s` and `k8s-extension` extensions are already installed, make sure they're updated to the latest version using the following commands:
3626
3727
```azurecli
3828
az extension update --name connectedk8s
3929
az extension update --name k8s-extension
4030
```
4131
42-
* An existing Azure Arc-enabled Kubernetes connected cluster, with at least one node of operating system and architecture type `linux/amd64`.
32+
* An existing Azure Arc-enabled Kubernetes connected cluster, with at least one node of operating system and architecture type `linux/amd64`.
4333
* If you haven't connected a cluster yet, use our [quickstart](quickstart-connect-cluster.md).
4434
* [Upgrade your agents](agent-upgrade.md#manually-upgrade-agents) to the latest version.
4535
4636
> [!NOTE]
4737
> Installing Azure Arc extensions on [AKS hybrid clusters provisioned from Azure](#aks-hybrid-clusters-provisioned-from-azure-preview) is currently in preview, with support for the Azure Arc-enabled Open Service Mesh, Azure Key Vault Secrets Provider, Flux (GitOps) and Microsoft Defender for Cloud extensions.
4838
49-
## Usage of cluster extensions
39+
## Create extension instance
5040
51-
### Create extensions instance
41+
To create a new extension instance, use `k8s-extension create`, passing in values for the required parameters.
5242
53-
Create a new extension instance with `k8s-extension create`, passing in values for the mandatory parameters. The below command creates an Azure Monitor for containers extension instance on your Azure Arc-enabled Kubernetes cluster:
43+
This example creates an [Azure Monitor Container Insights](extensions-release.md#azure-monitor-container-insights) extension instance on an Azure Arc-enabled Kubernetes cluster:
5444
5545
```azurecli
5646
az k8s-extension create --name azuremonitor-containers --extension-type Microsoft.AzureMonitor.Containers --scope cluster --cluster-name <clusterName> --resource-group <resourceGroupName> --cluster-type connectedClusters
@@ -93,41 +83,45 @@ az k8s-extension create --name azuremonitor-containers --extension-type Microso
9383
```
9484

9585
> [!NOTE]
96-
> The service is unable to retain sensitive information for more than 48 hours. If Azure Arc-enabled Kubernetes agents don't have network connectivity for more than 48 hours and cannot determine whether to create an extension on the cluster, then the extension transitions to `Failed` state. Once in `Failed` state, you will need to run `k8s-extension create` again to create a fresh extension Azure resource.
86+
> The service is unable to retain sensitive information for more than 48 hours. If Azure Arc-enabled Kubernetes agents don't have network connectivity for more than 48 hours and can't determine whether to create an extension on the cluster, the extension transitions to `Failed` state. Once that happens, you'll need to run `k8s-extension create` again to create a fresh extension Azure resource.
9787
>
98-
> Azure Monitor for containers is a singleton extension (only one required per cluster). You'll need to clean up any previous Helm chart installations of Azure Monitor for containers (without extensions) before installing the same via extensions. Follow the instructions for [deleting the Helm chart before running `az k8s-extension create`](../../azure-monitor/containers/container-insights-optout-hybrid.md).
88+
> Azure Monitor Container Insights is a singleton extension (only one required per cluster). You'll need to clean up any previous Helm chart installations of Azure Monitor Container Insights (without extensions) before installing the same via extensions. Follow the instructions for [deleting the Helm chart](../../azure-monitor/containers/container-insights-optout-hybrid.md) before running `az k8s-extension create`.
89+
90+
### Required parameters
9991

100-
**Required parameters**
92+
The following parameters are required when using `az k8s-extension create` to create an extension instance.
10193

10294
| Parameter name | Description |
10395
|----------------|------------|
10496
| `--name` | Name of the extension instance |
105-
| `--extension-type` | The type of extension you want to install on the cluster. For example: Microsoft.AzureMonitor.Containers, microsoft.azuredefender.kubernetes |
106-
| `--scope` | Scope of installation for the extension - `cluster` or `namespace` |
97+
| `--extension-type` | The [type of extension](extensions-release.md) you want to install on the cluster. For example: Microsoft.AzureMonitor.Containers, microsoft.azuredefender.kubernetes |
98+
| `--scope` | [Scope of installation](conceptual-extensions.md#extension-scope) for the extension: `cluster` or `namespace` |
10799
| `--cluster-name` | Name of the Azure Arc-enabled Kubernetes resource on which the extension instance has to be created |
108100
| `--resource-group` | The resource group containing the Azure Arc-enabled Kubernetes resource |
109-
| `--cluster-type` | The cluster type on which the extension instance has to be created. For most scenarios, use `connectedClusters`, which corresponds to Azure Arc-enabled Kubernetes. |
101+
| `--cluster-type` | The cluster type on which the extension instance has to be created. For most scenarios, use `connectedClusters`, which corresponds to Azure Arc-enabled Kubernetes clusters. |
110102

111103
> [!NOTE]
112-
> When working with [AKS hybrid clusters provisioned from Azure](#aks-hybrid-clusters-provisioned-from-azure-preview) you must set `--cluster-type` to use `provisionedClusters` and also add `--cluster-resource-provider microsoft.hybridcontainerservice` to the command. Installing Azure Arc extensions on AKS hybrid clusters provisioned from Azure is currently in preview.
104+
> When working with [AKS hybrid clusters provisioned from Azure](#aks-hybrid-clusters-provisioned-from-azure-preview, you must set `--cluster-type` to use `provisionedClusters` and also add `--cluster-resource-provider microsoft.hybridcontainerservice` to the command. Installing Azure Arc extensions on AKS hybrid clusters provisioned from Azure is currently in preview.
113105
114-
**Optional parameters**
106+
### Optional parameters
107+
108+
Use one or more of these optional parameters as needed for your scenarios, along with the required parameters.
115109

116110
| Parameter name | Description |
117111
|--------------|------------|
118-
| `--auto-upgrade-minor-version` | Boolean property that specifies if the extension minor version will be upgraded automatically or not. Default: `true`. If this parameter is set to true, you cannot set `version` parameter, as the version will be dynamically updated. If set to `false`, extension will not be auto-upgraded even for patch versions. |
119-
| `--version` | Version of the extension to be installed (specific version to pin the extension instance to). Must not be supplied if auto-upgrade-minor-version is set to `true`. |
120-
| `--configuration-settings` | Settings that can be passed into the extension to control its functionality. They are to be passed in as space separated `key=value` pairs after the parameter name. If this parameter is used in the command, then `--configuration-settings-file` can't be used in the same command. |
121-
| `--configuration-settings-file` | Path to the JSON file having key value pairs to be used for passing in configuration settings to the extension. If this parameter is used in the command, then `--configuration-settings` can't be used in the same command. |
122-
| `--configuration-protected-settings` | These settings are not retrievable using `GET` API calls or `az k8s-extension show` commands, and are thus used to pass in sensitive settings. They are to be passed in as space separated `key=value` pairs after the parameter name. If this parameter is used in the command, then `--configuration-protected-settings-file` can't be used in the same command. |
123-
| `--configuration-protected-settings-file` | Path to the JSON file having key value pairs to be used for passing in sensitive settings to the extension. If this parameter is used in the command, then `--configuration-protected-settings` can't be used in the same command. |
124-
| `--release-namespace` | This parameter indicates the namespace within which the release is to be created. This parameter is only relevant if `scope` parameter is set to `cluster`. |
125-
| `--release-train` | Extension authors can publish versions in different release trains such as `Stable`, `Preview`, etc. If this parameter is not set explicitly, `Stable` is used as default. This parameter can't be used when `autoUpgradeMinorVersion` parameter is set to `false`. |
126-
| `--target-namespace` | This parameter indicates the namespace within which the release will be created. Permission of the system account created for this extension instance will be restricted to this namespace. This parameter is only relevant if the `scope` parameter is set to `namespace`. |
112+
| `--auto-upgrade-minor-version` | Boolean property that determines whether the extension minor version is automatically upgraded. The default setting is `true`. If this parameter is set to `true`, you can't set the `version` parameter, as the version will be dynamically updated. If set to `false`, the extension won't be automatically upgraded, even for patch versions. |
113+
| `--version` | Version of the extension to be installed (specific version to pin the extension instance to). Must not be supplied if `auto-upgrade-minor-version` is set to `true`. |
114+
| `--configuration-settings` | Settings that can be passed into the extension to control its functionality. These are passed in as space-separated `key=value` pairs after the parameter name. If this parameter is used in the command, then `--configuration-settings-file` can't be used in the same command. |
115+
| `--configuration-settings-file` | Path to a JSON file with `key=value` pairs to be used for passing configuration settings into the extension. If this parameter is used in the command, then `--configuration-settings` can't be used in the same command. |
116+
| `--configuration-protected-settings` | Settings that aren't retrievable using `GET` API calls or `az k8s-extension show` commands. Typically used to pass in sensitive settings. These are passed in as space-separated `key=value` pairs after the parameter name. If this parameter is used in the command, then `--configuration-protected-settings-file` can't be used in the same command. |
117+
| `--configuration-protected-settings-file` | Path to a JSON file with `key=value` pairs to be used for passing sensitive settings into the extension. If this parameter is used in the command, then `--configuration-protected-settings` can't be used in the same command. |
118+
| `--release-namespace` | This parameter indicates the namespace within which the release will be created. Only relevant if `scope` is set to `cluster`. |
119+
| `--release-train` | Extension authors can publish versions in different release trains such as `Stable`, `Preview`, etc. If this parameter isn't set explicitly, `Stable` is used as default. This parameter can't be used when `--auto-upgrade-minor-version` is set to `false`. |
120+
| `--target-namespace` | Indicates the namespace within which the release will be created. Permission of the system account created for this extension instance will be restricted to this namespace. Only relevant if `scope` is set to `namespace`. |
127121

128-
### Show details of an extension instance
122+
## Show extension details
129123

130-
View details of a currently installed extension instance with `k8s-extension show`, passing in values for the mandatory parameters:
124+
To view details of a currently installed extension instance, use `k8s-extension show`, passing in values for the mandatory parameters.
131125

132126
```azurecli
133127
az k8s-extension show --name azuremonitor-containers --cluster-name <clusterName> --resource-group <resourceGroupName> --cluster-type connectedClusters
@@ -169,9 +163,9 @@ az k8s-extension show --name azuremonitor-containers --cluster-name <clusterName
169163
}
170164
```
171165

172-
### List all extensions installed on the cluster
166+
## List all extensions installed on the cluster
173167

174-
List all extensions installed on a cluster with `k8s-extension list`, passing in values for the mandatory parameters.
168+
To view a list of all extensions installed on a cluster, use `k8s-extension list`, passing in values for the mandatory parameters.
175169

176170
```azurecli
177171
az k8s-extension list --cluster-name <clusterName> --resource-group <resourceGroupName> --cluster-type connectedClusters
@@ -233,9 +227,9 @@ az k8s-extension list --cluster-name <clusterName> --resource-group <resourceGro
233227
]
234228
```
235229

236-
### Delete extension instance
230+
## Delete extension instance
237231

238-
Delete an extension instance on a cluster with `k8s-extension delete`, passing in values for the mandatory parameters.
232+
To delete an extension instance on a cluster, use `k8s-extension delete`, passing in values for the mandatory parameters.
239233

240234
```azurecli
241235
az k8s-extension delete --name azuremonitor-containers --cluster-name <clusterName> --resource-group <resourceGroupName> --cluster-type connectedClusters
@@ -244,7 +238,7 @@ az k8s-extension delete --name azuremonitor-containers --cluster-name <clusterNa
244238
> [!NOTE]
245239
> The Azure resource representing this extension gets deleted immediately. The Helm release on the cluster associated with this extension is only deleted when the agents running on the Kubernetes cluster have network connectivity and can reach out to Azure services again to fetch the desired state.
246240
247-
> [!NOTE]
241+
> [!IMPORTANT]
248242
> When working with [AKS hybrid clusters provisioned from Azure](#aks-hybrid-clusters-provisioned-from-azure-preview), you must add `--yes` to the delete command. Installing Azure Arc extensions on AKS hybrid clusters provisioned from Azure is currently in preview.
249243
250244
## AKS hybrid clusters provisioned from Azure (preview)
@@ -274,5 +268,6 @@ az extension update --name k8s-extension
274268
275269
## Next steps
276270

271+
* Review the [az k8s-extension CLI reference](/cli/azure/k8s-extension) for a comprehensive list of commands and parameters.
277272
* Learn more about [how extensions work with Arc-enabled Kubernetes clusters](conceptual-extensions.md).
278273
* Review the [cluster extensions currently available for Azure Arc-enabled Kubernetes](extensions-release.md).

0 commit comments

Comments
 (0)