Skip to content

Commit ab98e52

Browse files
committed
add section for uami
Signed-off-by: Troy Connor <[email protected]>
1 parent 1810e93 commit ab98e52

File tree

2 files changed

+73
-0
lines changed

2 files changed

+73
-0
lines changed

articles/operator-nexus/howto-configure-cluster.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ Managed Identity can be assigned to the Cluster during creation or update operat
118118
- **--mi-system-assigned** - Enable System-assigned managed identity. Once added, the Identity can only be removed via the API call at this time.
119119
- **--mi-user-assigned** - Space-separated resource IDs of the User-assigned managed identities to be added. Once added, the Identity can only be removed via the API call at this time.
120120

121+
[Create cluster with User assigned Managed Identity](./howto-create-cluster-with-user-assigned-managed-identity.md)
121122
### Create the Cluster using Azure Resource Manager template editor
122123

123124
An alternate way to create a Cluster is with the ARM template editor.

articles/operator-nexus/howto-create-cluster-with-user-assigned-managed-identity.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,75 @@ ms.custom: template-how-to
1010
---
1111

1212

13+
# Create a Cluster Resource with a User Assigned Managed Identity
14+
15+
To create a cluster without a service principal user name and password, you can now create a cluster with a user-assigned managed identity that has permissions over the Log Analytics Workspace. This will be used when installing the extensions that utilize the Log Analytics Workspace.
16+
17+
## Prerequisites
18+
19+
1. Install the latest version of the
20+
[appropriate CLI extensions](./howto-install-cli-extensions.md)
21+
1. A Log Analytics Workspace
22+
1. A user-assigned managed identity resource with permissions over the log analytics workspace of [Log Analytics Contributor](https://learn.microsoft.com/en-us/azure/role-based-access-control/built-in-roles/analytics#log-analytics-contributor).
23+
24+
> [!NOTE]
25+
> This functionality exists with the latest GA API offered by Azure Operator Nexus
26+
27+
28+
### Create and configure Log Analytics Workspace and User Assigned Managed Identity
29+
30+
1. Create a Log Analytics Workspace [Create a Log Analytics Workspace](/azure/azure-monitor/logs/quick-create-workspace).
31+
1. Assign the "Log Analytics Contributor" role to users and managed identities which need access to the Log Analytics Workspace.
32+
1. See [Assign an Azure role for access to the analytics Workspace](azure/azure-monitor/logs/manage-access?tabs=portal#azure-rbac). The role must also be assigned to either a user-assigned managed identity or the cluster's own system-assigned managed identity.
33+
1. For more information on managed identities, see [Managed identities for Azure resources](/entra/identity/managed-identities-azure-resources/overview).
34+
1. If using the Cluster's system assigned identity, the system assigned identity needs to be added to the cluster before it can be granted access.
35+
1. When assigning a role to the cluster's system-assigned identity, make sure you select the resource with the type "Cluster (Operator Nexus)."
36+
37+
### Configure the cluster to use a user-assigned managed identity for Log Analytics Workspace access
38+
39+
```azurecli-interactive
40+
az networkcloud cluster create --name "<cluster-name>" \
41+
--resource-group "<cluster-resource-group>" \
42+
--mi-user-assigned "<user-assigned-identity-resource-id>" \
43+
--analytics-output-settings identity-type="UserAssignedIdentity" \
44+
identity-resource-id="<user-assigned-identity-resource-id>" \
45+
--subscription "<subscription>"
46+
```
47+
48+
### View the principal ID for the managed identity
49+
50+
The identity resource ID can be found by selecting "JSON view" on the identity resource; the ID is at the top of the panel that appears. The container URL can be found on the Settings -> Properties tab of the container resource.
51+
52+
The CLI can also be used to view the identity and the associated principal ID data within the cluster.
53+
54+
Example:
55+
56+
```console
57+
az networkcloud cluster show --ids /subscriptions/<Subscription ID>/resourceGroups/<Cluster Resource Group Name>/providers/Microsoft.NetworkCloud/clusters/<Cluster Name>
58+
```
59+
60+
System-assigned identity example:
61+
62+
```
63+
"identity": {
64+
"principalId": "aaaaaaaa-bbbb-cccc-1111-222222222222",
65+
"tenantId": "aaaabbbb-0000-cccc-1111-dddd2222eeee",
66+
"type": "SystemAssigned"
67+
},
68+
```
69+
70+
User-assigned identity example:
71+
72+
```
73+
"identity": {
74+
"type": "UserAssigned",
75+
"userAssignedIdentities": {
76+
"/subscriptions/<subscriptionID>/resourcegroups/<resourceGroupName>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/<userAssignedIdentityName>": {
77+
"clientId": "00001111-aaaa-2222-bbbb-3333cccc4444",
78+
"principalId": "bbbbbbbb-cccc-dddd-2222-333333333333"
79+
}
80+
}
81+
},
82+
```
83+
84+

0 commit comments

Comments
 (0)