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,7 +13,57 @@ 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
+
19
+ ### Pre-requisite
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
+ ** 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
+
16
65
### Prerequisites
66
+ - Azure Monitor Private Link Scope (AMPLS)
17
67
- The template must be deployed in the same resource group as the cluster.
18
68
19
69
### Download and install template
@@ -72,6 +122,8 @@ Use the following procedures to enable network isolation by connecting your clus
72
122
az aks enable-addons -a monitoring --resource-group <AKSClusterResourceGorup> --name <AKSClusterName> --workspace-resource-id <workspace-resource-id>
73
123
```
74
124
125
+ ---
126
+
75
127
## Next steps
76
128
77
129
* If you experience issues while you attempt to onboard the solution, review the [Troubleshooting guide](container-insights-troubleshoot.md).
0 commit comments