File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -33,19 +33,35 @@ The Arc data services extension managed identity is used for uploading metrics.
33
33
34
34
### (1) Retrieve managed identity of the Arc data controller extension
35
35
36
+ # [ PowerShell] ( #tab/powershell )
36
37
``` powershell
37
38
$Env:MSI_OBJECT_ID = (az k8s-extension show --resource-group <resource group> --cluster-name <connectedclustername> --cluster-type connectedClusters --name <name of extension> | convertFrom-json).identity.principalId
38
39
#Example
39
40
$Env:MSI_OBJECT_ID = (az k8s-extension show --resource-group myresourcegroup --cluster-name myconnectedcluster --cluster-type connectedClusters --name ads-extension | convertFrom-json).identity.principalId
40
41
```
41
42
43
+ # [ macOS & Linux] ( #tab/linux )
44
+ ``` console
45
+ export MSI_OBJECT_ID=`az k8s-extension show --resource-group <resource group> --cluster-name <connectedclustername> --cluster-type connectedClusters --name <name of extension> | jq '.identity.principalId' | tr -d \"`
46
+ #Example
47
+ export MSI_OBJECT_ID=`az k8s-extension show --resource-group myresourcegroup --cluster-name myconnectedcluster --cluster-type connectedClusters --name ads-extension | jq '.identity.principalId' | tr -d \"`
48
+ ```
49
+
50
+ ---
51
+
42
52
### (2) Assign role to the managed identity
43
53
44
54
Run the below command to assign the ** Monitoring Metrics Publisher** role:
55
+ # [ PowerShell] ( #tab/powershell )
45
56
``` powershell
46
57
az role assignment create --assignee $Env:MSI_OBJECT_ID --role 'Monitoring Metrics Publisher' --scope "/subscriptions/$SUBSCRIPTION_ID/resourceGroups/$RESOURCE_GROUP_NAME"
58
+ ```
47
59
60
+ # [ macOS & Linux] ( #tab/linux )
61
+ ``` console
62
+ az role assignment create --assignee ${MSI_OBJECT_ID} --role 'Monitoring Metrics Publisher' --scope "/subscriptions/${subscription}/resourceGroups/${resourceGroup}"
48
63
```
64
+ ---
49
65
50
66
### Automatic upload of metrics can be enabled as follows:
51
67
```
You can’t perform that action at this time.
0 commit comments