Skip to content

Commit 9ab2665

Browse files
authored
Merge pull request #205577 from bwren/ci-ama
AMA on Container insights
2 parents 0aed89a + 010dfe8 commit 9ab2665

7 files changed

+257
-69
lines changed

articles/azure-monitor/containers/container-insights-enable-arc-enabled-clusters.md

Lines changed: 84 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ ms.reviewer: aul
3232
- To view the monitoring data, you need to have [Log Analytics Reader](../logs/manage-access.md#azure-rbac) role assignment on the Log Analytics workspace.
3333
- The following endpoints need to be enabled for outbound access in addition to the ones mentioned under [connecting a Kubernetes cluster to Azure Arc](../../azure-arc/kubernetes/quickstart-connect-cluster.md#meet-network-requirements).
3434

35+
**Azure public cloud**
36+
3537
| Endpoint | Port |
3638
|----------|------|
3739
| `*.ods.opinsights.azure.com` | 443 |
@@ -40,14 +42,30 @@ ms.reviewer: aul
4042
| `*.monitoring.azure.com` | 443 |
4143
| `login.microsoftonline.com` | 443 |
4244

45+
The following table lists the additional firewall configuration required for managed identity authentication.
46+
47+
|Agent resource| Purpose | Port |
48+
|--------------|------|---|
49+
| `global.handler.control.monitor.azure.com` | Access control service | 443 |
50+
| `<cluster-region-name>.handler.control.monitor.azure.com` | Fetch data collection rules for specific AKS cluster | 443 |
51+
52+
**Azure Government cloud**
53+
4354
If your Azure Arc-enabled Kubernetes resource is in Azure US Government environment, following endpoints need to be enabled for outbound access:
4455

4556
| Endpoint | Port |
4657
|----------|------|
4758
| `*.ods.opinsights.azure.us` | 443 |
4859
| `*.oms.opinsights.azure.us` | 443 |
4960
| `dc.services.visualstudio.com` | 443 |
50-
61+
62+
The following table lists the additional firewall configuration required for managed identity authentication.
63+
64+
|Agent resource| Purpose | Port |
65+
|--------------|------|---|
66+
| `global.handler.control.monitor.azure.cn` | Access control service | 443 |
67+
| `<cluster-region-name>.handler.control.monitor.azure.cn` | Fetch data collection rules for specific AKS cluster | 443 |
68+
5169

5270
- If you are using an Arc enabled cluster on AKS, and previously installed [monitoring for AKS](./container-insights-enable-existing-clusters.md), please ensure that you have [disabled monitoring](./container-insights-optout.md) before proceeding to avoid issues during the extension install
5371

@@ -81,7 +99,9 @@ Run the following commands to locate the full Azure Resource Manager identifier
8199
>[!TIP]
82100
> This `id` can also be found in the *Overview* blade of the Log Analytics workspace through the Azure portal.
83101
84-
## Create extension instance using Azure CLI
102+
## Create extension instance
103+
104+
## [CLI](#tab/create-cli)
85105
86106
### Option 1 - With default values
87107
@@ -94,6 +114,13 @@ This option uses the following defaults:
94114
az k8s-extension create --name azuremonitor-containers --cluster-name <cluster-name> --resource-group <resource-group> --cluster-type connectedClusters --extension-type Microsoft.AzureMonitor.Containers
95115
```
96116

117+
To use [managed identity authentication (preview)](container-insights-onboard.md#authentication), add the `configuration-settings` parameter as in the following:
118+
119+
```azurecli
120+
az k8s-extension create --name azuremonitor-containers --cluster-name <cluster-name> --resource-group <resource-group> --cluster-type connectedClusters --extension-type Microsoft.AzureMonitor.Containers --configuration-settings omsagent.useAADAuth=true
121+
```
122+
123+
97124
### Option 2 - With existing Azure Log Analytics workspace
98125

99126
You can use an existing Azure Log Analytics workspace in any subscription on which you have *Contributor* or a more permissive role assignment.
@@ -120,10 +147,11 @@ If the Azure Arc-enabled Kubernetes cluster is on Azure Stack Edge, then a custo
120147
az k8s-extension create --name azuremonitor-containers --cluster-name <cluster-name> --resource-group <resource-group> --cluster-type connectedClusters --extension-type Microsoft.AzureMonitor.Containers --configuration-settings omsagent.logsettings.custommountpath=/home/data/docker
121148
```
122149

150+
123151
>[!NOTE]
124152
> If you are explicitly specifying the version of the extension to be installed in the create command, then ensure that the version specified is >= 2.8.2.
125153
126-
## Create extension instance using Azure portal
154+
## [Azure portal](#tab/create-portal)
127155

128156
>[!IMPORTANT]
129157
> If you are deploying Azure Monitor on a Kubernetes cluster running on top of Azure Stack Edge, then the Azure CLI option needs to be followed instead of the Azure portal option as a custom mount path needs to be set for these clusters.
@@ -138,7 +166,9 @@ az k8s-extension create --name azuremonitor-containers --cluster-name <cluster-n
138166

139167
4. You can now choose the [Log Analytics workspace](../logs/quick-create-workspace.md) to send your metrics and logs data to.
140168

141-
5. Select the 'Configure' button to deploy the Azure Monitor Container Insights cluster extension.
169+
5. To use managed identity authentication, select the *Use managed identity (preview)* checkbox.
170+
171+
6. Select the 'Configure' button to deploy the Azure Monitor Container Insights cluster extension.
142172

143173
### Onboarding from Azure Monitor blade
144174

@@ -148,9 +178,13 @@ az k8s-extension create --name azuremonitor-containers --cluster-name <cluster-n
148178

149179
3. Click on the 'Enable' link next to the cluster that you want to enable monitoring for.
150180

151-
4. Choose the Log Analytics workspace and select the 'Configure' button to continue.
181+
4. Choose the Log Analytics workspace.
152182

153-
## Create extension instance using Azure Resource Manager
183+
5. To use managed identity authentication, select the *Use managed identity (preview)* checkbox.
184+
185+
6. Select the 'Configure' button to continue.
186+
187+
## [Resource Manager](#tab/create-arm)
154188

155189
1. Download Azure Resource Manager template and parameter:
156190

@@ -169,19 +203,61 @@ az k8s-extension create --name azuremonitor-containers --cluster-name <cluster-n
169203
az deployment group create --resource-group <resource-group> --template-file ./arc-k8s-azmon-extension-arm-template.json --parameters @./arc-k8s-azmon-extension-arm-template-params.json
170204
```
171205

206+
---
207+
172208
## Verify extension installation status
173209
Once you have successfully created the Azure Monitor extension for your Azure Arc-enabled Kubernetes cluster, you can additionally check the status of installation using the Azure portal or CLI. Successful installations should show the status as 'Installed'. If your status is showing 'Failed' or remains in the 'Pending' state for long periods of time, proceed to the Troubleshooting section below.
174210

175-
### Azure portal
211+
### [Azure portal](#tab/verify-portal)
176212
1. In the Azure portal, select the Azure Arc-enabled Kubernetes cluster with the extension installing
177213
2. Select the 'Extensions' item under the 'Settings' section of the resource blade
178214
3. You should see an extension with the name 'azuremonitor-containers' listed, with the listed status in the 'Install status' column
179-
### Azure CLI
215+
### [CLI](#tab/verify-cli)
180216
Run the following command to show the latest status of the `Microsoft.AzureMonitor.Containers` extension
181217
```azurecli
182218
az k8s-extension show --name azuremonitor-containers --cluster-name <cluster-name> --resource-group <resource-group> --cluster-type connectedClusters -n azuremonitor-containers
183219
```
184220

221+
---
222+
223+
## Migrate to managed identity authentication (preview)
224+
Use the flowing guidance to migrate an existing extension instance to managed identity authentication (preview).
225+
226+
## [CLI](#tab/migrate-cli)
227+
First retrieve the Log Analytics workspace configured for Container insights extension.
228+
229+
```cli
230+
az k8s-extension show --name azuremonitor-containers --cluster-name \<cluster-name\> --resource-group \<resource-group\> --cluster-type connectedClusters -n azuremonitor-containers
231+
```
232+
233+
Enable Container insights extension with managed identity authentication option using the workspace returned in the first step.
234+
235+
```cli
236+
az k8s-extension create --name azuremonitor-containers --cluster-name \<cluster-name\> --resource-group \<resource-group\> --cluster-type connectedClusters --extension-type Microsoft.AzureMonitor.Containers --configuration-settings omsagent.useAADAuth=true logAnalyticsWorkspaceResourceID=\<workspace-resource-id\>
237+
```
238+
239+
## [Resource Manager](#tab/migrate-arm)
240+
241+
242+
1. Download the template at [https://aka.ms/arc-k8s-azmon-extension-msi-arm-template](https://aka.ms/arc-k8s-azmon-extension-msi-arm-template) and save it as **arc-k8s-azmon-extension-msi-arm-template.json**.
243+
244+
2. Download the parameter file at [https://aka.ms/arc-k8s-azmon-extension-msi-arm-template-params](https://aka.ms/arc-k8s-azmon-extension-msi-arm-template) and save it as **arc-k8s-azmon-extension-msi-arm-template-params.json**.
245+
246+
3. Edit the values in the parameter file.
247+
248+
- For **workspaceDomain**, use *opinsights.azure.com* for Azure public cloud and *opinsights.azure.us* for Azure Government cloud.
249+
- Specify the tags in the **resourceTagValues** parameter if you want to use any Azure tags on the Azure resources that will be created as part of the Container insights extension.
250+
251+
4. Deploy the template to create Container Insights extension.
252+
253+
```cli
254+
az login
255+
az account set --subscription "Subscription Name"
256+
az deployment group create --resource-group <resource-group> --template-file ./arc-k8s-azmon-extension-msi-arm-template.json --parameters @./arc-k8s-azmon-extension-msi-arm-template-params.json
257+
```
258+
259+
---
260+
185261
## Delete extension instance
186262

187263
The following command only deletes the extension instance, but doesn't delete the Log Analytics workspace. The data within the Log Analytics resource is left intact.

0 commit comments

Comments
 (0)