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/deploy-iot-ops/howto-enable-secure-settings.md
+18-58Lines changed: 18 additions & 58 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -46,40 +46,16 @@ az connectedk8s show --name <CLUSTER_NAME> --resource-group <RESOURCE_GROUP> --q
46
46
47
47
Use the following steps to enable workload identity on an existing connected K3s cluster:
48
48
49
-
1. Download and install a preview version of the `connectedk8s` extension for Azure CLI. GitHub: [connectedk8s-1.10.0](https://github.com/AzureArcForKubernetes/azure-cli-extensions/blob/connectedk8s/public/cli-extensions/connectedk8s-1.10.0-py2.py3-none-any.whl).
1. Use the [az extension remove](/cli/azure/extension#az-extension-remove) command to remove the existing connectedk8s cli extension if you already installed it.
56
-
49
+
1. Remove the existing connected k8s cli if any
57
50
```azurecli
58
-
#!/bin/bash
59
51
az extension remove --name connectedk8s
60
52
```
61
53
62
-
1. Use the [az extension add](/cli/azure/extension#az-extension-add) command to add the new connectedk8s cli source.
63
-
64
-
```azurecli
65
-
#!/bin/bash
66
-
az extension add --upgrade --source <PATH_TO_WHL_FILE>
67
-
```
68
-
69
-
1. Use the [az connectedk8s upgrade](/cli/azure/connectedk8s#az-connectedk8s-upgrade) command to upgrade the Arc agent version to the private build that supports the workload identity feature.
54
+
1. Download and install a preview version of the `connectedk8s` extension for Azure CLI.
70
55
71
56
```azurecli
72
-
#!/bin/bash
73
-
74
-
# Variable block
75
-
RESOURCE_GROUP="<RESOURCE_GROUP>"
76
-
CLUSTER_NAME="<CLUSTER_NAME>"
77
-
RELEASE_TAG="1.20.1"
78
-
79
-
# Update the Arc agent version
80
-
az connectedk8s upgrade --resource-group $RESOURCE_GROUP \
az extension add --upgrade --source connectedk8s-1.10.0-py2.py3-none-any.whl
83
59
```
84
60
85
61
1. Use the [az connectedk8s update](/cli/azure/connectedk8s#az-connectedk8s-update) command to enable the workload identity feature on the cluster.
@@ -92,9 +68,7 @@ Use the following steps to enable workload identity on an existing connected K3s
92
68
CLUSTER_NAME="<CLUSTER_NAME>"
93
69
94
70
# Enable workload identity
95
-
az connectedk8s update --resource-group $RESOURCE_GROUP \
96
-
--name $CLUSTER_NAME \
97
-
--enable-oidc-issuer --enable-workload-identity
71
+
az connectedk8s update --resource-group $RESOURCE_GROUP --name $CLUSTER_NAME --enable-oidc-issuer --enable-workload-identity
98
72
```
99
73
100
74
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.
@@ -114,7 +88,7 @@ Use the following steps to enable workload identity on an existing connected K3s
114
88
1. Create a K3s config file.
115
89
116
90
```bash
117
-
nano /etc/rancher/k3s/config.yaml
91
+
sudo nano /etc/rancher/k3s/config.yaml
118
92
```
119
93
120
94
1. Add the following content to the config.yaml file:
@@ -154,10 +128,7 @@ If you already have an Azure Key Vault with `Key Vault Secrets Officer` permissi
154
128
LOCATION="<LOCATION>"
155
129
156
130
# Create the Key Vault
157
-
az keyvault create --name $KEYVAULT_NAME \
158
-
--resource-group $RESOURCE_GROUP \
159
-
--location $LOCATION \
160
-
--enable-rbac-authorization
131
+
az keyvault create --name $KEYVAULT_NAME --resource-group $RESOURCE_GROUP --location $LOCATION --enable-rbac-authorization
161
132
```
162
133
163
134
# [PowerShell](#tab/powershell)
@@ -191,9 +162,7 @@ If you already have an Azure Key Vault with `Key Vault Secrets Officer` permissi
191
162
ASSIGNEE_ID=$(az ad signed-in-user show --query id -o tsv)
192
163
193
164
# Assign the "Key Vault Secrets Officer" role
194
-
az role assignment create --role "Key Vault Secrets Officer" \
0 commit comments