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
+48-2Lines changed: 48 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ description: Enable secure settings in your Azure IoT Operations instance for de
4
4
author: asergaz
5
5
ms.author: sergaz
6
6
ms.topic: how-to
7
-
ms.date: 11/19/2024
7
+
ms.date: 01/21/2025
8
8
9
9
#CustomerIntent: I deployed Azure IoT Operations with test settings, and now I want to enable secure settings to use the full feature set.
10
10
---
@@ -21,12 +21,58 @@ This article provides instructions for enabling secure settings if you didn't do
21
21
22
22
* Azure CLI installed on your development machine. This scenario requires Azure CLI version 2.64.0 or higher. Use `az --version` to check your version and `az upgrade` to update if necessary. For more information, see [How to install the Azure CLI](/cli/azure/install-azure-cli).
23
23
24
+
* The latest version of the **connectedk8s** extension for Azure CLI. Use the following command to add the extension or update it to the latest version:
25
+
26
+
```bash
27
+
az extension add --upgrade --name connectedk8s
28
+
```
29
+
24
30
* The Azure IoT Operations extension for Azure CLI. Use the following command to add the extension or update it to the latest version:
25
31
26
32
```azurecli
27
33
az extension add --upgrade --name azure-iot-ops
28
34
```
29
35
36
+
## Enable the cluster for secure settings
37
+
38
+
Before you enable secrets synchronization for your Azure IoT Operations instance, enable your cluster as an OIDC issuer and for workload identity federation. This step is required for the Secret Store extension to sync the secrets from an Azure key vault and store them on the edge as Kubernetes secrets.
39
+
40
+
```azurecli
41
+
az connectedk8s update -n <CLUSTER_NAME> -g <RESOURCE_GROUP> --enable-oidc-issuer --enable-workload-identity
42
+
```
43
+
44
+
If you're using the k3s distribution of Kubernetes, you need to add the `service-account-issuer` and `service-account-max-token-expiration` arguments to the kube-apiserver. To add these settings, follow these steps:
45
+
46
+
1. Get the cluster's issuer URL.
47
+
48
+
```azurecli
49
+
az connectedk8s show -g <RESOURCE_GROUP> -n <CLUSTER_NAME> --query oidcIssuerProfile.issuerUrl --output tsv
50
+
```
51
+
52
+
Make a note of the output from this command to use in the next steps.
53
+
54
+
1. Create the k3s config file:
55
+
56
+
```bash
57
+
sudo nano /etc/rancher/k3s/config.yaml
58
+
```
59
+
60
+
1. Add the following content to the `config.yaml` file, replacing the `<SERVICE_ACCOUNT_ISSUER>` placeholder with the cluster issuer URL you made a note of previously:
61
+
62
+
```yml
63
+
kube-apiserver-arg:
64
+
- service-account-issuer=<SERVICE_ACCOUNT_ISSUER>
65
+
- service-account-max-token-expiration=24h
66
+
```
67
+
68
+
Save the file and exit the nano editor.
69
+
70
+
1. Restart the k3s service:
71
+
72
+
```bash
73
+
sudo systemctl restart k3s
74
+
```
75
+
30
76
## Set up secrets management
31
77
32
78
Secrets management for Azure IoT Operations uses the Secret Store extension to sync the secrets from an Azure key vault and store them on the edge as Kubernetes secrets. The Secret Store extension requires a user-assigned managed identity with access to the Azure key vault where secrets are stored. To learn more, see [What are managed identities for Azure resources?](/entra/identity/managed-identities-azure-resources/overview).
0 commit comments