You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
title: "Deploy and manage Azure Arc-enabled Kubernetes cluster extensions"
3
3
ms.custom: event-tier1-build-2022, ignite-2022
4
4
ms.date: 03/08/2023
5
5
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."
7
7
---
8
8
9
9
# Deploy and manage Azure Arc-enabled Kubernetes cluster extensions
10
10
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.
22
12
23
13
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).
24
14
25
15
## Prerequisites
26
16
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:
29
19
30
20
```azurecli
31
21
az extension add --name connectedk8s
32
22
az extension add --name k8s-extension
33
23
```
34
24
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:
36
26
37
27
```azurecli
38
28
az extension update --name connectedk8s
39
29
az extension update --name k8s-extension
40
30
```
41
31
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`.
43
33
* If you haven't connected a cluster yet, use our [quickstart](quickstart-connect-cluster.md).
44
34
* [Upgrade your agents](agent-upgrade.md#manually-upgrade-agents) to the latest version.
45
35
46
36
> [!NOTE]
47
37
> 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.
48
38
49
-
## Usage of cluster extensions
39
+
## Create extension instance
50
40
51
-
### Create extensions instance
41
+
To create a new extension instance, use `k8s-extension create`, passing in values for the required parameters.
52
42
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:
> 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.
97
87
>
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
99
91
100
-
**Required parameters**
92
+
The following parameters are required when using `az k8s-extension create` to create an extension instance.
101
93
102
94
| Parameter name | Description |
103
95
|----------------|------------|
104
96
|`--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`|
107
99
|`--cluster-name`| Name of the Azure Arc-enabled Kubernetes resource on which the extension instance has to be created |
108
100
|`--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. |
110
102
111
103
> [!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.
113
105
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.
115
109
116
110
| Parameter name | Description |
117
111
|--------------|------------|
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 spaceseparated `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 keyvalue 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 spaceseparated `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 keyvalue 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`. |
127
121
128
-
###Show details of an extension instance
122
+
## Show extension details
129
123
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.
131
125
132
126
```azurecli
133
127
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
169
163
}
170
164
```
171
165
172
-
###List all extensions installed on the cluster
166
+
## List all extensions installed on the cluster
173
167
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.
175
169
176
170
```azurecli
177
171
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
233
227
]
234
228
```
235
229
236
-
###Delete extension instance
230
+
## Delete extension instance
237
231
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.
> 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.
246
240
247
-
> [!NOTE]
241
+
> [!IMPORTANT]
248
242
> 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.
249
243
250
244
## AKS hybrid clusters provisioned from Azure (preview)
@@ -274,5 +268,6 @@ az extension update --name k8s-extension
274
268
275
269
## Next steps
276
270
271
+
* Review the [az k8s-extension CLI reference](/cli/azure/k8s-extension) for a comprehensive list of commands and parameters.
277
272
* Learn more about [how extensions work with Arc-enabled Kubernetes clusters](conceptual-extensions.md).
278
273
* Review the [cluster extensions currently available for Azure Arc-enabled Kubernetes](extensions-release.md).
0 commit comments