Skip to content

Commit b7aa76a

Browse files
committed
CLI for Container insights private link
1 parent 708fd65 commit b7aa76a

File tree

1 file changed

+53
-1
lines changed

1 file changed

+53
-1
lines changed

articles/azure-monitor/containers/container-insights-private-link.md

Lines changed: 53 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Enable private link with Container insights
33
description: Learn how to enable private link on an Azure Kubernetes Service (AKS) cluster.
44
ms.topic: conceptual
5-
ms.date: 10/18/2023
5+
ms.date: 06/05/2024
66
ms.custom: devx-track-azurecli
77
ms.reviewer: aul
88
---
@@ -13,7 +13,57 @@ This article describes how to configure Container insights to use Azure Private
1313

1414
## Cluster using managed identity authentication
1515

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+
1665
### Prerequisites
66+
- Azure Monitor Private Link Scope (AMPLS)
1767
- The template must be deployed in the same resource group as the cluster.
1868

1969
### Download and install template
@@ -72,6 +122,8 @@ Use the following procedures to enable network isolation by connecting your clus
72122
az aks enable-addons -a monitoring --resource-group <AKSClusterResourceGorup> --name <AKSClusterName> --workspace-resource-id <workspace-resource-id>
73123
```
74124
125+
---
126+
75127
## Next steps
76128
77129
* If you experience issues while you attempt to onboard the solution, review the [Troubleshooting guide](container-insights-troubleshoot.md).

0 commit comments

Comments
 (0)