Skip to content

Commit 1926d31

Browse files
committed
Additional detail
1 parent e3dde8a commit 1926d31

File tree

1 file changed

+48
-2
lines changed

1 file changed

+48
-2
lines changed

articles/iot-operations/deploy-iot-ops/howto-enable-secure-settings.md

Lines changed: 48 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Enable secure settings in your Azure IoT Operations instance for de
44
author: asergaz
55
ms.author: sergaz
66
ms.topic: how-to
7-
ms.date: 11/19/2024
7+
ms.date: 01/21/2025
88

99
#CustomerIntent: I deployed Azure IoT Operations with test settings, and now I want to enable secure settings to use the full feature set.
1010
---
@@ -21,12 +21,58 @@ This article provides instructions for enabling secure settings if you didn't do
2121

2222
* 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).
2323

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+
2430
* The Azure IoT Operations extension for Azure CLI. Use the following command to add the extension or update it to the latest version:
2531

2632
```azurecli
2733
az extension add --upgrade --name azure-iot-ops
2834
```
2935

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+
3076
## Set up secrets management
3177
3278
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).
@@ -67,7 +113,7 @@ To set up secrets management:
67113
68114
```azurecli
69115
# Variable block
70-
AIO_INSTANCE_NAME="<AIO_INSTANCE_NAME>"
116+
$AIO_INSTANCE_NAME="<AIO_INSTANCE_NAME>"
71117
$RESOURCE_GROUP="<RESOURCE_GROUP>"
72118
$USER_ASSIGNED_MI_NAME="<USER_ASSIGNED_MI_NAME>"
73119
$KEYVAULT_NAME="<KEYVAULT_NAME>"

0 commit comments

Comments
 (0)