Skip to content

Commit 3d67d3d

Browse files
authored
Merge pull request #290721 from asergaz/sergaz-enabless-ga
Update secure settings article - remove wlif steps
2 parents f7fee06 + 2709b03 commit 3d67d3d

File tree

1 file changed

+7
-74
lines changed

1 file changed

+7
-74
lines changed

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

Lines changed: 7 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -1,99 +1,32 @@
11
---
22
title: Enable secure settings
3-
description: Enable secure settings on your Azure IoT Operations deployment by configuring an Azure Key Vault and enabling workload identities.
3+
description: Enable secure settings in your Azure IoT Operations instance for developing a production-ready scenario.
44
author: asergaz
55
ms.author: sergaz
66
ms.topic: how-to
7-
ms.date: 11/04/2024
7+
ms.date: 11/19/2024
88

9-
#CustomerIntent: I deployed Azure IoT Operations with test settings for the quickstart scenario, and now I want to enable secure settings to use the full feature set.
9+
#CustomerIntent: I deployed Azure IoT Operations with test settings, and now I want to enable secure settings to use the full feature set.
1010
---
1111

12-
# Enable secure settings in Azure IoT Operations deployment
12+
# Enable secure settings in Azure IoT Operations
1313

1414
The secure settings for Azure IoT Operations include the setup of secrets management and a user-assigned managed identity for cloud connections; for example, an OPC UA server or dataflow endpoints.
1515

1616
This article provides instructions for enabling secure settings if you didn't do so during your initial deployment.
1717

1818
## Prerequisites
1919

20-
* An Azure IoT Operations instance deployed with test settings. For example, follow the instructions in [Quickstart: Run Azure IoT Operations in GitHub Codespaces](../get-started-end-to-end-sample/quickstart-deploy.md).
20+
* An Azure IoT Operations instance deployed with test settings. For example, you chose **Test Settings** when following the instructions in [Deploy Azure IoT Operations to an Arc-enabled Kubernetes cluster](howto-deploy-iot-operations.md).
2121

22-
* Azure CLI installed on your development machine. This scenario requires Azure CLI version 2.64.0 or later. 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).
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).
2323

24-
* The latest versions of the following extensions for the Azure CLI:
24+
* The Azure IoT Operations extension for Azure CLI. Use the following command to add the extension or update it to the latest version:
2525

2626
```azurecli
2727
az extension add --upgrade --name azure-iot-ops
28-
az extension add --upgrade --name connectedk8s
2928
```
3029

31-
## Configure a cluster for a workload identity
32-
33-
A *workload identity* is an identity that you assign to a software workload (such as an application, service, script, or container) to authenticate and access other services and resources. The workload identity feature needs to be enabled on your cluster, so that the [Azure Key Vault Secret Store extension for Kubernetes](/azure/azure-arc/kubernetes/secret-store-extension) and Azure IoT Operations can access Microsoft Entra ID protected resources. To learn more, see [What are workload identities?](/entra/workload-id/workload-identities-overview).
34-
35-
> [!NOTE]
36-
> This step applies only to Ubuntu + K3s clusters. The quickstart script for Azure Kubernetes Service (AKS) Edge Essentials used in [Prepare your Azure Arc-enabled Kubernetes cluster](../deploy-iot-ops/howto-prepare-cluster.md) enables a workload identity by default. If you have an AKS Edge Essentials cluster, continue to the next section.
37-
38-
If you aren't sure whether or not your K3s cluster already has workload identity enabled, run the [az connectedk8s show](/cli/azure/connectedk8s#az-connectedk8s-show) command to check:
39-
40-
```azurecli
41-
az connectedk8s show --name <CLUSTER_NAME> --resource-group <RESOURCE_GROUP> --query "{oidcIssuerEnabled:oidcIssuerProfile.enabled, workloadIdentityEnabled: securityProfile.workloadIdentity.enabled}"
42-
```
43-
44-
To enable a workload identity on an existing connected K3s cluster:
45-
46-
1. Use the [az connectedk8s update](/cli/azure/connectedk8s#az-connectedk8s-update) command to enable the workload identity feature on the cluster:
47-
48-
```azurecli
49-
#!/bin/bash
50-
51-
# Variable block
52-
RESOURCE_GROUP="<RESOURCE_GROUP>"
53-
CLUSTER_NAME="<CLUSTER_NAME>"
54-
55-
# Enable a workload identity
56-
az connectedk8s update --resource-group $RESOURCE_GROUP \
57-
--name $CLUSTER_NAME \
58-
--enable-oidc-issuer --enable-workload-identity
59-
```
60-
61-
1. Use the [az connectedk8s show](/cli/azure/connectedk8s#az-connectedk8s-show) command to get the cluster's issuer URL. You'll add the URL later in the K3s configuration file.
62-
63-
```azurecli
64-
#!/bin/bash
65-
66-
# Variable block
67-
RESOURCE_GROUP="<RESOURCE_GROUP>"
68-
CLUSTER_NAME="<CLUSTER_NAME>"
69-
70-
# Get the cluster's issuer URL
71-
SERVICE_ACCOUNT_ISSUER=$(az connectedk8s show --resource-group $RESOURCE_GROUP --name $CLUSTER_NAME --query oidcIssuerProfile.issuerUrl --output tsv)
72-
echo "SERVICE_ACCOUNT_ISSUER = $SERVICE_ACCOUNT_ISSUER"
73-
```
74-
75-
1. Create a K3s configuration file:
76-
77-
```bash
78-
sudo nano /etc/rancher/k3s/config.yaml
79-
```
80-
81-
1. Add the following content to the config.yaml file:
82-
83-
```yml
84-
kube-apiserver-arg:
85-
- service-account-issuer=<SERVICE_ACCOUNT_ISSUER>
86-
- service-account-max-token-expiration=24h
87-
```
88-
89-
1. Save and close the file editor.
90-
91-
1. Restart k3s:
92-
93-
```bash
94-
systemctl restart k3s
95-
```
96-
9730
## Set up secrets management
9831

9932
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

Comments
 (0)