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/iot-operations/secure-iot-ops/howto-enable-secure-settings.md
+24-10Lines changed: 24 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,10 +42,8 @@ If you aren't sure whether your K3s cluster already has workload identity enable
42
42
```azurecli
43
43
az connectedk8s show --name <CLUSTER_NAME> --resource-group <RESOURCE_GROUP> --query "{oidcIssuerEnabled:oidcIssuerProfile.enabled, workloadIdentityEnabled: securityProfile.workloadIdentity.enabled}"
44
44
```
45
-
> [!NOTE]
46
-
>You can skip this section if workload identity is already set up.
47
45
48
-
Use the following steps to enable workload identity on an existing connected K3s cluster:
46
+
If not already set up, use the following steps to enable workload identity on an existing connected K3s cluster:
49
47
50
48
1. Use the [az connectedk8s update](/cli/azure/connectedk8s#az-connectedk8s-update) command to enable the workload identity feature on the cluster.
51
49
@@ -57,7 +55,9 @@ Use the following steps to enable workload identity on an existing connected K3s
57
55
CLUSTER_NAME="<CLUSTER_NAME>"
58
56
59
57
# Enable workload identity
60
-
az connectedk8s update --resource-group $RESOURCE_GROUP --name $CLUSTER_NAME --enable-oidc-issuer --enable-workload-identity
58
+
az connectedk8s update --resource-group $RESOURCE_GROUP \
59
+
--name $CLUSTER_NAME \
60
+
--enable-oidc-issuer --enable-workload-identity
61
61
```
62
62
63
63
1. Use the [az connectedk8s show](/cli/azure/connectedk8s#az-connectedk8s-show) command to to get the cluster's issuer url. Take a note to add it later in K3s config file.
@@ -117,7 +117,10 @@ If you already have an Azure Key Vault with `Key Vault Secrets Officer` permissi
117
117
LOCATION="<LOCATION>"
118
118
119
119
# Create the Key Vault
120
-
az keyvault create --name $KEYVAULT_NAME --resource-group $RESOURCE_GROUP --location $LOCATION --enable-rbac-authorization
120
+
az keyvault create --name $KEYVAULT_NAME \
121
+
--resource-group $RESOURCE_GROUP \
122
+
--location $LOCATION \
123
+
--enable-rbac-authorization
121
124
```
122
125
123
126
# [PowerShell](#tab/powershell)
@@ -151,7 +154,9 @@ If you already have an Azure Key Vault with `Key Vault Secrets Officer` permissi
151
154
ASSIGNEE_ID=$(az ad signed-in-user show --query id -o tsv)
152
155
153
156
# Assign the "Key Vault Secrets Officer" role
154
-
az role assignment create --role "Key Vault Secrets Officer" --assignee $ASSIGNEE_ID --scope /subscriptions/$SUBSCRIPTION_ID/resourcegroups/$RESOURCE_GROUP/providers/Microsoft.KeyVault/vaults/$KEYVAULT_NAME
157
+
az role assignment create --role "Key Vault Secrets Officer" \
0 commit comments