Skip to content

Commit 29ede84

Browse files
Merge pull request #3554 from MicrosoftDocs/main638773275454263201sync_temp
For protected branch, push strategy should use PR and merge to target branch method to work around git push error
2 parents babb1e0 + 543e713 commit 29ede84

27 files changed

+347
-47
lines changed

AKS-Arc/TOC.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -222,14 +222,20 @@
222222
href: aks-edge-howto-deploy-azure-iot.md
223223
- name: Offline installation
224224
href: aks-edge-howto-offline-install.md
225-
- name: Access TPM secrets
226-
href: aks-edge-howto-access-tpm.md
227225
- name: Additional configuration
228226
href: aks-edge-howto-more-configs.md
229227
- name: Use GPU acceleration
230228
href: aks-edge-gpu.md
231-
- name: Configure Workload Identity
232-
href: aks-edge-workload-identity.md
229+
- name: Security
230+
items:
231+
- name: Configure Workload Identity
232+
href: aks-edge-workload-identity.md
233+
- name: Access TPM secrets
234+
href: aks-edge-howto-access-tpm.md
235+
- name: Enable secret encryption with the KMS plugin
236+
href: aks-edge-howto-secret-encryption.md
237+
- name: Use the Key Manager for Kubernetes extension
238+
href: aks-edge-howto-key-manager.md
233239
- name: Update AKS Edge Essentials
234240
items:
235241
- name: Update online

AKS-Arc/aks-edge-concept-networking.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Basic networking concepts for AKS Edge Essentials
44
author: sethmanheim
55
ms.author: sethm
66
ms.topic: conceptual
7-
ms.date: 07/11/2024
7+
ms.date: 03/10/2025
88
ms.custom: template-concept
99
---
1010

@@ -99,7 +99,7 @@ It's possible to check the DNS servers being used for both Linux and Windows nod
9999
Invoke-AksEdgeNodeCommand -NodeType Linux -command "resolvectl status"
100100
```
101101
102-
The command output shows a list of the DNS servers configured for each Linux VM interfaces. In particular, it's important to check the **eth0** interface status, which is the default interface for the AKS EE VM communication. Also, make sure to check the IP addresses of the **Current DNS Server** and **DNS Servers** fields of the list. If there's no IP address, or the IP address isn't a valid DNS server IP address, then the DNS service won't work.
102+
The command output shows a list of the DNS servers configured for each Linux VM interfaces. In particular, it's important to check the **eth0** interface status, which is the default interface for the AKS Edge Essentials VM communication. Also, make sure to check the IP addresses of the **Current DNS Server** and **DNS Servers** fields of the list. If there's no IP address, or the IP address isn't a valid DNS server IP address, then the DNS service won't work.
103103
104104
- For Windows VM nodes:
105105

AKS-Arc/aks-edge-deployment-config-json.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Description of deployment configuration JSON parameters in AKS Edge
44
author: sethmanheim
55
ms.author: sethm
66
ms.topic: conceptual
7-
ms.date: 07/11/2024
7+
ms.date: 03/10/2025
88
ms.custom: template-concept
99
---
1010

@@ -21,6 +21,7 @@ You can find the complete JSON schema file at `C:\Program Files\AksEdge\aksedge-
2121
| `DeploymentType` |[`SingleMachineCluster` / `ScalableCluster`]| Specifies deployment type. In `ScalableCluster`, you can add more machines to the cluster infrastructure. | `SingleMachineCluster` |Single-machine and full deployment|
2222
| `Init.ServiceIPRangeStart` |IPv4 address `A.B.C.x`.|Reserved IP start address for your Kubernetes services. This IP range must be free on your subnet **A.B.C.0**.| None |Single-machine and full deployment|
2323
| `Init.ServiceIPRangeSize` |`[0-127]`|Number of reserved IP start addresses for your Kubernetes services. Based on the size, we allocate a range of free IP addresses on your subnet. | `0` |Single-machine and full deployment|
24+
| `Init.KmsPlugin.Enable` | Boolean | Specifies whether the KMS plugin is enabled or not. | false | Single-machine and full deployment|
2425
| `Join.ClusterJoinToken` |String|`Reserved` | None |Full deployment only|
2526
| `Join.DiscoveryTokenHash` |String|`Reserved`| None |Full deployment only|
2627
| `Join.CertificateKey` |String|`Reserved`| None |Full deployment only|

AKS-Arc/aks-edge-howto-connect-to-arc.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,17 @@ description: Connect your AKS Edge Essentials clusters to Arc
44
author: sethmanheim
55
ms.author: sethm
66
ms.topic: how-to
7-
ms.date: 09/27/2024
7+
ms.date: 03/10/2025
88
ms.custom: template-how-to
99
---
1010

1111
# Connect your AKS Edge Essentials cluster to Arc
1212

1313
This article describes how to connect your AKS Edge Essentials cluster to [Azure Arc](/azure/azure-arc/kubernetes/overview) so that you can monitor the health of your cluster on the Azure portal. If your cluster is connected to a proxy, you can use the scripts provided in the GitHub repo to connect your cluster to Arc [as described here](./aks-edge-howto-more-configs.md).
1414

15+
> [!IMPORTANT]
16+
> Starting with the AKS Edge Essentials 1.10.868.0 release, the `Arc` section of the config file is required. The Azure Arc connection occurs automatically after you run `New-AksEdgeDeployment` to deploy an AKS Edge Essentials cluster.
17+
1518
## Prerequisites
1619

1720
- Before connecting to Arc, infrastructure administrators who are the owner or contributor role of the subscription will have to:

AKS-Arc/aks-edge-howto-key-manager.md

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
---
2+
title: Use Key Manager for Kubernetes clusters on AKS Edge Essentials (preview)
3+
description: Learn how to use the Key Manager for Kubernetes extension to rotate service account keys in Azure Kubernetes Service (AKS) Edge Essentials clusters.
4+
ms.topic: how-to
5+
author: sethmanheim
6+
ms.author: sethm
7+
ms.date: 03/10/2025
8+
ms.reviewer: leslielin
9+
---
10+
11+
# How-to: use Key Manager for Kubernetes on an AKS Edge Essentials cluster (preview)
12+
13+
The [Kubernetes service account](https://kubernetes.io/docs/concepts/security/service-accounts/) is a a non-human account that provides a unique identity within a Kubernetes cluster. Service account tokens serve important security and authentication functions in Kubernetes.
14+
15+
In AKS Edge Essentials, *service account tokens* enable workload pods to authenticate and access Azure resources through [*workload identity federation*](aks-edge-workload-identity.md). Key Manager for Kubernetes is an Azure Arc extension that automates the rotation of the signing key used to issue these service account tokens. The rotation reduces the risk of token misuse and improves the overall security posture of the cluster.
16+
17+
The following table compares the default behavior with and without using the Key Manager for Kubernetes extension:
18+
19+
| Behavior | By default, without the Key Manager extension | With the Key Manager extension |
20+
|----------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------|
21+
| Automated service account key rotation | By default, Kubernetes doesn't automatically rotate service account signing keys. Instead, it uses the same key indefinitely to sign tokens. | Once enabled, the service account signing key is rotated automatically every 45 days. |
22+
| Service account signing key validity | Unlimited | 90 days |
23+
24+
> [!IMPORTANT]
25+
> These preview features are available on a self-service, opt-in basis. Previews are provided "as is" and "as available," and they're excluded from the service-level agreements and limited warranty. Azure Kubernetes Service Edge Essentials previews are partially covered by customer support on a best-effort basis.
26+
27+
> [!NOTE]
28+
> During the preview, the Key Manager for Kubernetes is only available for AKS Edge Essentials K3s version 1.30.6 or later single control plane node deployments with Arc connectivity. It's not compatible with other Arc-enabled Kubernetes distributions.
29+
30+
## Before you begin
31+
32+
Before you begin, ensure you have the following prerequisites:
33+
34+
- An AKS Edge Essentials K3s cluster with Arc connectivity. If you plan to use Azure IoT Operations with AKS Edge Essentials, follow this [Quickstart guide](aks-edge-howto-deploy-azure-iot.md#create-an-arc-enabled-cluster) to create your cluster.
35+
- To enable TLS for intracluster log communication, the `cert-manager` and `trust-manager` tools are required.
36+
- If you plan to [use Azure IoT Operations](/azure/iot-operations/get-started-end-to-end-sample/quickstart-deploy#deploy-azure-iot-operations), deploy it before installing the Key Manager for Kubernetes extension, since Azure IoT Operations installs its own copy of these applications by default.
37+
- To verify if `cert-manager` and `trust-manager` are installed, run the following command::
38+
39+
```bash
40+
kubectl get pods -n cert-manager
41+
```
42+
43+
If they are installed, you can see their pods in a running state.
44+
45+
- If `cert-manager` and `trust-manager` are not present, follow the documentation to:
46+
47+
1. Install [cert-manager](https://cert-manager.io/docs/installation/).
48+
1. Install [trust-manager](https://cert-manager.io/docs/trust/trust-manager/installation/). While installing trust manager, set the `trust namespace` to `cert-manager`. For example:
49+
50+
```bash
51+
helm upgrade trust-manager jetstack/trust-manager --install --namespace cert-manager --set app.trust.namespace=cert-manager --wait
52+
```
53+
54+
`trust-manager` is used to distribute a trust bundle to components.
55+
56+
- The Key Manager extension only works with [bounded service account tokens](https://kubernetes.io/docs/reference/access-authn-authz/service-accounts-admin/#manual-secret-management-for-serviceaccounts). It doesn't support legacy tokens with infinite lifetimes. If your workflow relies on legacy tokens, do not install this extension.
57+
- Bounded service account tokens have a default lifetime of one year. To rotate these tokens, this lifetime should be reduced to one day, which ensures that tokens are rapidly reissued and signed with newly rotated keys. To implement these changes, you must modify the `api-server` configuration by running the following commands:
58+
59+
```powershell
60+
$url = "https://raw.githubusercontent.com/Azure/AKS-Edge/refs/heads/main/tools/scripts/AksEdgeKeyManagerExtension/UpdateK3sConfigForKeyManager.ps1"
61+
Invoke-WebRequest -Uri $url -OutFile .\UpdateK3sConfigForKeyManager.ps1
62+
Unblock-File .\UpdateK3sConfigForKeyManager.ps1
63+
Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process -Force
64+
65+
.\UpdateK3sConfigForKeyManager.ps1
66+
```
67+
68+
## Install the Key Manager for Kubernetes extension for service account key rotation
69+
70+
> [!IMPORTANT]
71+
> After you install the Key Manager extension, the `api-server` is updated with the new service account token during token rotation. This process briefly makes the API server inaccessible while it restarts.
72+
73+
Now run the following commands. Replace the variables with your specific resource group name and AKS cluster name:
74+
75+
# [Azure PowerShell](#tab/powershell)
76+
77+
```powershell
78+
New-AzKubernetesExtension -SubscriptionId $yoursubscriptionID -ResourceGroupName $resource_group_name -ClusterName $aks_cluster_name -ClusterType connectedClusters -Name "MySAkeymanager" -ExtensionType microsoft.arc.kuberneteskeymanager
79+
```
80+
81+
# [Azure CLI](#tab/azurecli)
82+
83+
```azurecli
84+
az k8s-extension create -g $resource_group_name -c $aks_cluster_name -t connectedClusters -n "MySAkeymanager" --extension-type microsoft.arc.kuberneteskeymanager
85+
```
86+
87+
---
88+
89+
After you install the extension, you can view the **MySAkeymanager** extension in the Azure portal under the **Settings/Extensions** section of your Kubernetes cluster.
90+
91+
## Remove key manager for Kubernetes extension
92+
93+
You can uninstall the Key Manager extension using the [az k8s-extension delete](/cli/azure/k8s-extension#az-k8s-extension-delete) command:
94+
95+
# [Azure PowerShell](#tab/powershell)
96+
97+
```powershell
98+
Remove-AzKubernetesExtension -ResourceGroupName $resource_group_name -ClusterName $aks_cluster_name -ClusterType connectedClusters -Name "MySAkeymanager"
99+
```
100+
101+
# [Azure CLI](#tab/azurecli)
102+
103+
```azurecli
104+
az k8s-extension delete -g $resource_group_name -c $aks_cluster_name -t connectedClusters -n "MySAkeymanager"
105+
```
106+
107+
---
108+
109+
## Working with Azure IoT Operations
110+
111+
If you installed the Key Manager for Kubernetes extension before you deployed Azure IoT Operations, you must follow the [Bring your own issuer](/azure/iot-operations/secure-iot-ops/concept-default-root-ca#bring-your-own-issuer) instructions, as Azure IoT Operations installs `cert-manager` and `trust-manager` by default.
112+
113+
## Next steps
114+
115+
- [Deploy and configure workload identity on an AKS cluster](/azure/aks/workload-identity-deploy-cluster)
116+
- [Configure Workload Identity on an AKS Edge Essentials cluster](aks-edge-workload-identity.md)

AKS-Arc/aks-edge-howto-multi-node-deployment.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Describes how to create a cluster with multiple machines in AKS Edg
44
author: sethmanheim
55
ms.author: sethm
66
ms.topic: how-to
7-
ms.date: 01/09/2025
7+
ms.date: 03/10/2025
88
ms.custom: template-how-to
99
---
1010

@@ -52,6 +52,11 @@ The key parameters to note for a scalable Kubernetes deployment are:
5252
> [!IMPORTANT]
5353
> The Kubernetes `pod cidr` is `10.42.0.0/16` for K3s and `10.244.0.0/24` for K8s. The Kubernetes `service cidr` is `10.43.0.0/16` for K3s and `10.96.0.0/12` for K8s.
5454
55+
- `Arc`: This section is required. During the AKS Edge Essentials deployment, the Arc parameters are used to connect the AKS Edge Essentials cluster to Azure Arc. For more information about the required Arc parameters, see the [connect to Arc documentation](aks-edge-howto-connect-to-arc.md).
56+
57+
> [!IMPORTANT]
58+
> Starting with the AKS Edge Essentials 1.10.868.0 release, the `Arc` section of the config file is required. The Azure Arc connection occurs automatically during AKS Edge Essentials deployment.
59+
5560
- The `Network.NetworkPlugin` value by default is `flannel`. Flannel is the default CNI for a K3S cluster. In a K8S cluster, change the `NetworkPlugin` to `calico`.
5661
- In addition to the previous parameters, you can set the following parameters according to your deployment configuration, [as described here](aks-edge-deployment-config-json.md): `LinuxNode.CpuCount`, `LinuxNode.MemoryInMB`, `LinuxNode.DataSizeInGB`, `LinuxNode.Ip4Address`, `WindowsNode.CpuCount`, `WindowsNode.MemoryInMB`, `WindowsNode.Ip4Address`, `Init.ServiceIPRangeSize`, and `Network.InternetDisabled`.
5762
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
---
2+
title: Enable secret encryption on an AKS Edge Essentials cluster (preview)
3+
description: Learn how to enable the KMS plugin for AKS Edge Essentials clusters to encrypt secrets.
4+
author: sethmanheim
5+
ms.author: sethm
6+
ms.topic: how-to
7+
ms.date: 03/11/2025
8+
ms.custom: template-how-to
9+
ms.reviewer: leslielin
10+
---
11+
12+
# Enable secret encryption on an AKS Edge Essentials cluster (preview)
13+
14+
Following Kubernetes security best practices, it's recommended that you encrypt the Kubernetes secret store on AKS Edge Essentials clusters. You can perform this encryption by activating the *Key Management Service (KMS) plugin for AKS Edge Essentials*, which enables [encryption at rest for secrets](https://kubernetes.io/docs/concepts/configuration/secret/) stored in the etcd key-value store. It enables this encryption by generating a Key Encryption Key (KEK) and automatically rotating it every 30 days. The KEK is protected with administrator credentials and is accessible only to administrators.
15+
16+
For more detailed information about using KMS, see the official [KMS provider documentation](https://kubernetes.io/docs/tasks/administer-cluster/kms-provider/).
17+
18+
This article demonstrates how to activate the KMS plugin for AKS Edge Essentials clusters.
19+
20+
> [!IMPORTANT]
21+
> The KMS plugin for AKS Edge Essentials is currently in PREVIEW. See the [Supplemental Terms of Use for Microsoft Azure Previews](https://azure.microsoft.com/support/legal/preview-supplemental-terms/) for legal terms that apply to Azure features that are in beta, preview, or otherwise not yet released into general availability.
22+
23+
## Prerequisites
24+
25+
The KMS plugin is supported for all AKS Edge Essentials clusters, version 1.10.868.0 and later.
26+
27+
> [!NOTE]
28+
> The KMS plugin can only be used for single node clusters. The plugin can't be used with [experimental features, such as multi-node](aks-edge-system-requirements.md#experimental-or-prerelease-features).
29+
30+
## Enable the KMS plugin
31+
32+
In your [**aksedge-config.json** file](aks-edge-deployment-config-json.md), in the `Init` section, set `Init.KmsPlugin.Enable` to `true`:
33+
34+
```json
35+
"Init": {
36+
"KmsPlugin": {
37+
"Enable": true
38+
}
39+
}
40+
```
41+
42+
The following output is displayed during deployment, showing that the KMS plugin is enabled:
43+
44+
```output
45+
Preparing to install kms-plugin as encryption provider...
46+
```
47+
48+
For deployment instructions, see [Single machine deployment](aks-edge-howto-single-node-deployment.md).
49+
50+
> [!NOTE]
51+
> You can only enable or disable the KMS plugin when you create a new deployment. Once you set the flag, it can't be changed.
52+
53+
## Verify that the KMS plugin is enabled
54+
55+
To verify that the KMS plugin is enabled, run the following command and ensure that the health status of **kms-providers** is **OK**:
56+
57+
```powershell
58+
kubectl get --raw='/readyz?verbose'
59+
```
60+
61+
```output
62+
[+]ping ok
63+
[+]Log ok
64+
[+]etcd ok
65+
[+]kms-providers ok
66+
[+]poststarthook/start-encryption-provider-config-automatic-reload ok
67+
```
68+
69+
To create secrets in AKS Edge Essentials clusters, see [Managing Secrets using kubectl](https://kubernetes.io/docs/tasks/configmap-secret/managing-secret-using-kubectl/#use-raw-data) in the Kubernetes documentation.
70+
71+
If you encounter errors, see the [Troubleshooting](#troubleshooting) section.
72+
73+
## Troubleshooting
74+
75+
If there are errors with the KMS plugin, follow this procedure:
76+
77+
1. Check that the AKS version is **1.10.868.0** or later. Use the following command to check the current version of AKS Edge Essentials:
78+
79+
```powershell
80+
Get-Command -Module AKSEdge | Format-Table Name, Version
81+
```
82+
83+
If the version is older, upgrade to the latest version. For more information, see [Upgrade an AKS cluster](aks-edge-howto-update.md).
84+
85+
1. View the `readyz` API. If the problem persists, verify that the KMS plugin is enabled. See the [Verify that the KMS plugin is enabled](#verify-that-the-kms-plugin-is-enabled) section.
86+
87+
If you receive "**[-]**" before the `kms-providers` field, collect diagnostic logs for debugging. For more information, see [Get kubelet logs from cluster nodes](aks-get-kubelet-logs.md).
88+
89+
1. Repair KMS. If there are still errors, the machine running the AKS Edge Essentials cluster might be paused or turned off for an extended period of time (over 30 days). To get KMS back into a healthy state, you can use the `Repair-Kms` command to restore any necessary tokens:
90+
91+
```powershell
92+
Repair-AksEdgeKms
93+
```
94+
95+
1. If you still encounter errors, contact [Microsoft Customer Support](aks-edge-troubleshoot-overview.md) and [collect logs](aks-get-kubelet-logs.md).
96+
97+
## Next steps
98+
99+
- [Overview](aks-edge-overview.md)
100+
- [Uninstall AKS cluster](aks-edge-howto-uninstall.md)

0 commit comments

Comments
 (0)