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
Copy file name to clipboardExpand all lines: articles/azure-monitor/containers/container-insights-private-link.md
+87-24Lines changed: 87 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
title: Enable private link with Container insights
3
3
description: Learn how to enable private link on an Azure Kubernetes Service (AKS) cluster.
4
4
ms.topic: conceptual
5
-
ms.date: 10/18/2023
5
+
ms.date: 06/05/2024
6
6
ms.custom: devx-track-azurecli
7
7
ms.reviewer: aul
8
8
---
@@ -13,39 +13,100 @@ This article describes how to configure Container insights to use Azure Private
13
13
14
14
## Cluster using managed identity authentication
15
15
16
+
### [CLI](#tab/cli)
17
+
18
+
16
19
### Prerequisites
20
+
- Azure CLI version 2.61.0 or higher.
21
+
- Azure Monitor Private Link Scope (AMPLS)
22
+
23
+
24
+
### Existing AKS Cluster
25
+
26
+
**Use default Log Analytics workspace**
27
+
28
+
```azurecli
29
+
az aks enable-addons --addon monitoring --name <cluster-name> --resource-group <cluster-resource-group-name> --ampls-resource-id "<azure-monitor-private-link-scope-resource-id>"
30
+
```
31
+
32
+
Example:
33
+
34
+
```azurecli
35
+
az aks enable-addons --addon monitoring --name "my-cluster" --resource-group "my-resource-group" --workspace-resource-id "/subscriptions/my-subscription/resourceGroups/my-resource-group/providers/Microsoft.OperationalInsights/workspaces/my-workspace" --ampls-resource-id "/subscriptions/my-subscription /resourceGroups/ my-resource-group/providers/microsoft.insights/privatelinkscopes/my-ampls-resource"
36
+
```
37
+
38
+
**Use existing Log Analytics workspace**
39
+
40
+
```azurecli
41
+
az aks enable-addons --addon monitoring --name <cluster-name> --resource-group <cluster-resource-group-name> --workspace-resource-id <workspace-resource-id> --ampls-resource-id "<azure-monitor-private-link-scope-resource-id>"
42
+
```
43
+
44
+
Example:
45
+
46
+
```azurecli
47
+
az aks enable-addons --addon monitoring --name "my-cluster" --resource-group "my-resource-group" --workspace-resource-id "/subscriptions/my-subscription/resourceGroups/my-resource-group/providers/Microsoft.OperationalInsights/workspaces/my-workspace" --ampls-resource-id "/subscriptions/my-subscription /resourceGroups/ my-resource-group/providers/microsoft.insights/privatelinkscopes/my-ampls-resource"
48
+
```
49
+
50
+
### New AKS cluster
51
+
52
+
```azurecli
53
+
az aks create --resource-group rgName --name clusterName --enable-addons monitoring --workspace-resource-id "workspaceResourceId" --ampls-resource-id "azure-monitor-private-link-scope-resource-id"
54
+
```
55
+
56
+
Example:
57
+
58
+
```azurecli
59
+
az aks create --resource-group "my-resource-group" --name "my-cluster" --enable-addons monitoring --workspace-resource-id "/subscriptions/my-subscription/resourceGroups/my-resource-group/providers/Microsoft.OperationalInsights/workspaces/my-workspace" --ampls-resource-id "/subscriptions/my-subscription /resourceGroups/ my-resource-group/providers/microsoft.insights/privatelinkscopes/my-ampls-resource"
60
+
```
61
+
62
+
63
+
### [ARM](#tab/arm)
64
+
65
+
The following sections provide links to the template and parameter files for enabling private link with Container insights on an AKS and Arc-enabled clusters.
66
+
67
+
Edit the values in the parameter file and deploy the template using any valid method for deploying ARM templates. Retrieve the **resource ID** of the resources from the **JSON** View of their **Overview** page.
68
+
69
+
Based on your requirements, you can configure other parameters such `streams`, `enableContainerLogV2`, `enableSyslog`, `syslogLevels`, `syslogFacilities`, `dataCollectionInterval`, `namespaceFilteringModeForDataCollection` and `namespacesForDataCollection`.
70
+
71
+
### Prerequisites
72
+
- Azure Monitor Private Link Scope (AMPLS)
17
73
- The template must be deployed in the same resource group as the cluster.
|`aksResourceLocation`| Azure Region of the cluster. |
85
+
|`workspaceResourceId`| Resource ID of the Log Analytics workspace. |
86
+
|`workspaceRegion`| Region of the Log Analytics workspace. |
87
+
|`resourceTagValues`| Tag values specified for the existing Container insights extension data collection rule (DCR) of the cluster and the name of the DCR. The name will be MSCI-\<clusterName\>-\<clusterRegion\>, and this resource created in an AKS clusters resource group. For first time onboarding, you can set arbitrary tag values. |
88
+
|`useAzureMonitorPrivateLinkScope`| Boolean flag to indicate whether Azure Monitor link scope is used or not. |
89
+
|`azureMonitorPrivateLinkScopeResourceId`| Resource ID of the Azure Monitor Private link scope. This only used if `useAzureMonitorPrivateLinkScope` is set to **true**. |
30
90
31
-
2. Edit the following values in the parameter file. Retrieve the **resource ID** of the resources from the **JSON** View of their **Overview** page.
91
+
### Arc-enabled Kubernetes cluster
32
92
33
-
| Parameter | Description |
34
-
|:---|:---|
35
-
| AKS: `aksResourceId`<br>Arc: `clusterResourceId` | Resource ID of the cluster. |
36
-
| AKS: `aksResourceLocation`<br>Arc: `clusterRegion` | Azure Region of the cluster. |
37
-
| AKS: `workspaceResourceId`<br>Arc: `workspaceResourceId` | Resource ID of the Log Analytics workspace. |
38
-
| AKS: `workspaceRegion`<br>Arc: `workspaceRegion` | Region of the Log Analytics workspace. |
39
-
| Arc: `workspaceDomain` | Domain of the Log Analytics workspace:<br>`opinsights.azure.com` for Azure public cloud<br>`opinsights.azure.us` for Azure US Government<br>`opinsights.azure.cn` for Azure China Cloud |
40
-
| AKS: `resourceTagValues` | Tag values specified for the existing Container insights extension data collection rule (DCR) of the cluster and the name of the DCR. The name will be MSCI-\<clusterName\>-\<clusterRegion\>, and this resource created in an AKS clusters resource group. For first time onboarding, you can set arbitrary tag values. |
41
-
| AKS: `useAzureMonitorPrivateLinkScope`<br>Arc: `useAzureMonitorPrivateLinkScope` | Boolean flag to indicate whether Azure Monitor link scope is used or not. |
42
-
| AKS: `azureMonitorPrivateLinkScopeResourceId`<br>Arc: `azureMonitorPrivateLinkScopeResourceId` | Resource ID of the Azure Monitor Private link scope. This only used if `useAzureMonitorPrivateLinkScope` is set to **true**. |
Based on your requirements, you can configure other parameters such `streams`, `enableContainerLogV2`, `enableSyslog`, `syslogLevels`, `syslogFacilities`, `dataCollectionInterval`, `namespaceFilteringModeForDataCollection` and `namespacesForDataCollection`.
96
+
| Parameter | Description |
97
+
|:---|:---|
98
+
|`clusterResourceId`| Resource ID of the cluster. |
99
+
|`clusterRegion`| Azure Region of the cluster. |
100
+
|`workspaceResourceId`| Resource ID of the Log Analytics workspace. |
101
+
|`workspaceRegion`| Region of the Log Analytics workspace. |
102
+
|`workspaceDomain`| Domain of the Log Analytics workspace:<br>`opinsights.azure.com` for Azure public cloud<br>`opinsights.azure.us` for Azure US Government<br>`opinsights.azure.cn` for Azure China Cloud |
103
+
|`resourceTagValues`| Tag values specified for the existing Container insights extension data collection rule (DCR) of the cluster and the name of the DCR. The name will be MSCI-\<clusterName\>-\<clusterRegion\>, and this resource created in an AKS clusters resource group. For first time onboarding, you can set arbitrary tag values. |
104
+
|`useAzureMonitorPrivateLinkScope`| Boolean flag to indicate whether Azure Monitor link scope is used or not. |
105
+
|`azureMonitorPrivateLinkScopeResourceId`| Resource ID of the Azure Monitor Private link scope. This is only used if `useAzureMonitorPrivateLinkScope` is set to **true**. |
45
106
46
-
3. Deploy the template with the parameter file by using any valid method for deploying Resource Manager templates. For examples of different methods, see [Deploy the sample templates](../resource-manager-samples.md#deploy-the-sample-templates).
107
+
---
47
108
48
-
###Cluster using legacy authentication
109
+
## Cluster using legacy authentication
49
110
Use the following procedures to enable network isolation by connecting your cluster to the Log Analytics workspace using [Azure Private Link](../logs/private-link-security.md) if your cluster is not using managed identity authentication. This requires a [private AKS cluster](../../aks/private-clusters.md).
50
111
51
112
1. Create a private AKS cluster following the guidance in [Create a private Azure Kubernetes Service cluster](../../aks/private-clusters.md).
@@ -72,6 +133,8 @@ Use the following procedures to enable network isolation by connecting your clus
72
133
az aks enable-addons -a monitoring --resource-group <AKSClusterResourceGorup> --name <AKSClusterName> --workspace-resource-id <workspace-resource-id>
73
134
```
74
135
136
+
137
+
75
138
## Next steps
76
139
77
140
* If you experience issues while you attempt to onboard the solution, review the [Troubleshooting guide](container-insights-troubleshoot.md).
0 commit comments