Skip to content

Commit 5edc633

Browse files
Merge pull request #230347 from MGoedtel/task62174
Trusted launch for AKS article
2 parents 03840dc + b1813bb commit 5edc633

File tree

2 files changed

+219
-1
lines changed

2 files changed

+219
-1
lines changed

articles/aks/TOC.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,13 +266,14 @@
266266
href: custom-node-configuration.md
267267
- name: Abort long running operations
268268
href: manage-abort-operations.md
269-
270269
- name: Stop/deallocate nodes with Scale-down Mode
271270
href: scale-down-mode.md
272271
- name: Connect securely to cluster nodes
273272
href: node-access.md
274273
- name: Manage SSH key
275274
href: manage-ssh-node-access.md
275+
- name: Deploy trusted launch on AKS
276+
href: use-trusted-launch.md
276277
- name: Node pools
277278
items:
278279
- name: Create node pools

articles/aks/use-trusted-launch.md

Lines changed: 217 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,217 @@
1+
---
2+
title: Trusted launch (preview) with Azure Kubernetes Service (AKS)
3+
description: Learn how trusted launch (preview) protects the Azure Kubernetes Cluster (AKS) nodes against boot kits, rootkits, and kernel-level malware.
4+
ms.topic: article
5+
ms.date: 03/08/2024
6+
7+
---
8+
9+
# Trusted launch (preview) for Azure Kubernetes Service (AKS)
10+
11+
[Trusted launch][trusted-launch-overview] (preview) improves the security of generation 2 virtual machines (VMs) by protecting against advanced and persistent attack techniques. It enables administrators to deploy AKS nodes, which contain the underlying virtual machines, with verified and signed bootloaders, OS kernels, and drivers. By using secure and measured boot, administrators gain insights and confidence of the entire boot chain's integrity.
12+
13+
This article helps you understand this new feature, and how to implement it.
14+
15+
## Overview
16+
17+
Trusted launch is composed of several, coordinated infrastructure technologies that can be enabled independently. Each technology provides another layer of defense against sophisticated threats.
18+
19+
- **vTPM** - Trusted launch introduces a virtualized version of a hardware [Trusted Platform Module][trusted-platform-module-overview] (TPM), compliant with the TPM 2.0 specification. It serves as a dedicated secure vault for keys and measurements. Trusted launch provides your VM with its own dedicated TPM instance, running in a secure environment outside the reach of any VM. The vTPM enables [attestation][attestation-overview] by measuring the entire boot chain of your VM (UEFI, OS, system, and drivers). Trusted launch uses the vTPM to perform remote attestation by the cloud. It is used for platform health checks and for making trust-based decisions. As a health check, trusted launch can cryptographically certify that your VM booted correctly. If the process fails, possibly because your VM is running an unauthorized component, [Microsoft Defender for Cloud][microsoft-defender-for-cloud-overview] issues integrity alerts. The alerts include details on which components failed to pass integrity checks.
20+
21+
- **Secure Boot** - At the root of trusted launch is Secure Boot for your VM. This mode, which is implemented in platform firmware, protects against the installation of malware-based rootkits and boot kits. Secure Boot works to ensure that only signed operating systems and drivers can boot. It establishes a "root of trust" for the software stack on your VM. With Secure Boot enabled, all OS boot components (boot loader, kernel, kernel drivers) must be signed by trusted publishers. Both Windows and select Linux distributions support Secure Boot. If Secure Boot fails to authenticate an image signed by a trusted publisher, the VM isn't allowed to boot. For more information, see [Secure Boot][secure-boot-overview].
22+
23+
## Before you begin
24+
25+
- The Azure CLI version 2.44.1 or later. Run `az --version` to find the version, and run `az upgrade` to upgrade the version. If you need to install or upgrade, see [Install Azure CLI][install-azure-cli].
26+
27+
- The `aks-preview` Azure CLI extension version 1.0.0b6 or later.
28+
29+
- Register the `TrustedLaunchPreview` feature in your Azure subscription.
30+
31+
- AKS supports trusted launch (preview) on version 1.25.2 and higher.
32+
33+
- Trusted Launch only supports [Azure Generation 2 VMs][azure-generation-two-virtual-machines].
34+
35+
- Secure Boot requires signed boot loaders, OS kernels, and drivers.
36+
37+
### Install the aks-preview Azure CLI extension
38+
39+
[!INCLUDE [preview features callout](includes/preview/preview-callout.md)]
40+
41+
To install the aks-preview extension, run the following command:
42+
43+
```azurecli
44+
az extension add --name aks-preview
45+
```
46+
47+
Run the following command to update to the latest version of the extension released:
48+
49+
```azurecli
50+
az extension update --name aks-preview
51+
```
52+
53+
### Register the TrustedLaunchPreview feature flag
54+
55+
Register the `TrustedLaunchPreview` feature flag by using the [az feature register][az-feature-register] command, as shown in the following example:
56+
57+
```azurecli-interactive
58+
az feature register --namespace "Microsoft.ContainerService" --name "TrustedLaunchPreview"
59+
```
60+
61+
It takes a few minutes for the status to show *Registered*. Verify the registration status by using the [az feature show][az-feature-show] command:
62+
63+
```azurecli-interactive
64+
az feature show --namespace "Microsoft.ContainerService" --name "TrustedLaunchPreview"
65+
```
66+
67+
When the status reflects *Registered*, refresh the registration of the *Microsoft.ContainerService* resource provider by using the [az provider register][az-provider-register] command:
68+
69+
```azurecli-interactive
70+
az provider register --namespace "Microsoft.ContainerService"
71+
```
72+
73+
## Limitations
74+
75+
- Cluster nodes running Windows Server operating system aren't supported.
76+
- Trusted launch (preview) doesn't support node pools with FIPS enabled or based on ARM64.
77+
- Availability sets aren't supported, only Virtual Machine Scale Sets.
78+
- To enable Secure Boot on GPU node pools, you need to skip installing the GPU driver. For more information, see[Skip GPU driver installation][skip-gpu-driver-install].
79+
- Ephemeral OS disks can be created with Trusted launch and all regions are supported. However, not all virtual machines sizes are supported. For more information, see [Trusted launch ephemeral OS sizes][tusted-launch-ephemeral-os-sizes].
80+
81+
## Deploy new cluster
82+
83+
Perform the following steps to deploy an AKS cluster using the Azure CLI.
84+
85+
1. Create an AKS cluster using the [az aks create][az-aks-create] command. Before running the command, review the following parameters:
86+
87+
* **--name**: Enter a unique name for the AKS cluster, such as *myAKSCluster*.
88+
* **--resource-group**: Enter the name of an existing resource group to host the AKS cluster resource.
89+
* **--enable-secure-boot**: Enables Secure Boot to authenticate an image signed by a trusted publisher.
90+
* **--enable-vtpm**: Enables vTPM and performs attestation by measuring the entire boot chain of your VM.
91+
92+
> [!NOTE]
93+
> Secure Boot requires signed boot loaders, OS kernels, and drivers. If after enabling Secure Boot your nodes don't start, you can verify which boot components are responsible for Secure Boot failures within an Azure Linux Virtual Machine. See [verify Secure Boot failures][verify-secure-boot-failures].
94+
95+
The following example creates a cluster named *myAKSCluster* with one node in the *myResourceGroup*, and enables Secure Boot and vTPM:
96+
97+
```azurecli
98+
az aks create --name myAKSCluster --resource-group myResourceGroup --enable-secure-boot --enable-vtpm --enable-managed-identity --generate-ssh-keys
99+
```
100+
101+
2. Run the following command to get access credentials for the Kubernetes cluster. Use the [az aks get-credentials][az-aks-get-credentials] command and replace the values for the cluster name and the resource group name.
102+
103+
```azurecli
104+
az aks get-credentials --resource-group myResourceGroup --name myAKSCluster
105+
```
106+
107+
## Add a node pool with trusted launch enabled
108+
109+
Deploy a node pool with trusted launch enabled using the [az aks nodepool add][az-aks-nodepool-add] command. Before running the command, review the following parameters:
110+
111+
* **--cluster-name**: Enter the name of the AKS cluster.
112+
* **--resource-group**: Enter the name of an existing resource group to host the AKS cluster resource.
113+
* **--name**: Enter a unique name for the node pool. The name of a node pool may only contain lowercase alphanumeric characters and must begin with a lowercase letter. For Linux node pools, the length must be between 1-11 characters.
114+
* **--node-count**: The number of nodes in the Kubernetes agent pool. Default is 3.
115+
* **--enable-secure-boot**: Enables Secure Boot to authenticate image signed by a trusted publisher.
116+
* **--enable-vtpm**: Enables vTPM and performs attestation by measuring the entire boot chain of your VM.
117+
118+
> [!NOTE]
119+
> Secure Boot requires signed boot loaders, OS kernels, and drivers. If after enabling Secure Boot your nodes don't start, you can verify which boot components are responsible for Secure Boot failures within an Azure Linux Virtual Machine. See [verify Secure Boot failures][verify-secure-boot-failures].
120+
121+
The following example deploys a node pool with vTPM enabled on a cluster named *myAKSCluster* with three nodes:
122+
123+
```azurecli-interactive
124+
az aks nodepool add --resource-group myResourceGroup -–cluster-name myAKSCluster --name mynodepool --node-count 3 --enable-vtpm
125+
```
126+
127+
The following example deploys a node pool with vTPM and Secure Boot enabled on a cluster named *myAKSCluster* with three nodes:
128+
129+
```azurecli-interactive
130+
az aks nodepool add --resource-group myResourceGroup --cluster-name myAKSCluster --name mynodepool --node-count 3 --enable-vtpm --enable-secure-boot
131+
```
132+
133+
## Update cluster and enable trusted launch
134+
135+
Update a node pool with trusted launch enabled using the [az aks nodepool update][az-aks-nodepool-update] command. Before running the command, review the following parameters:
136+
137+
* **--resource-group**: Enter the name of an existing resource group hosting your existing AKS cluster.
138+
* **--cluster-name**: Enter a unique name for the AKS cluster, such as *myAKSCluster*.
139+
* **--name**: Enter the name of your node pool, such as *mynodepool*.
140+
* **--enable-secure-boot**: Enables Secure Boot to authenticate that the image was signed by a trusted publisher.
141+
* **--enable-vtpm**: Enables vTPM and performs attestation by measuring the entire boot chain of your VM.
142+
143+
> [!NOTE]
144+
> The existing nodepool must be using a trusted launch image in order to enable on an existing node pool. By default, creating a node pool with a TL-compatible configuration and the feature flag registered results in a trusted launch image. Without specifying `--enable-vtpm` or `--enable-secure-boot` parameters, they are disabled by default and you can enable later using `az aks nodepool update` command.
145+
146+
> [!NOTE]
147+
> Secure Boot requires signed boot loaders, OS kernels, and drivers. If after enabling Secure Boot your nodes don't start, you can verify which boot components are responsible for Secure Boot failures within an Azure Linux Virtual Machine. See [verify Secure Boot failures][verify-secure-boot-failures].
148+
149+
The following example updates the node pool *mynodepool* on the *myAKSCluster* in the *myResourceGroup*, and enables Secure Boot and vTPM:
150+
151+
```azurecli-interactive
152+
az aks nodepool update --cluster-name myCluster --resource-group myResourceGroup --name mynodepool --enable-secure-boot --enable-vtpm
153+
```
154+
155+
## Assign pods to nodes with trusted launch enabled
156+
157+
You can constrain a pod and restrict it to run on a specific node or nodes, or preference to nodes with trusted launch enabled. You can control this using the following node pool selector in your pod manifest.
158+
159+
For a node pool running vTPM, apply the following:
160+
161+
```yml
162+
spec:
163+
  nodeSelector:
164+
        kubernetes.azure.com/trusted-launch: true
165+
```
166+
167+
For a node pool running Secure Boot, apply the following:
168+
169+
```yml
170+
spec:
171+
  nodeSelector:
172+
        kubernetes.azure.com/secure-boot: true
173+
```
174+
175+
## Disable Secure Boot
176+
177+
To disable Secure Boot on an AKS cluster, run the following command:
178+
179+
```azurecli-interactive
180+
az aks nodepool update --cluster-name myCluster --resource-group myResourceGroup --name mynodepool --disable-secure-boot
181+
```
182+
183+
> [!NOTE]
184+
> Updates automatically kickoff a node reimage and this operation can take several minutes per node.
185+
186+
## Disable vTPM
187+
188+
To disable vTPM on an AKS cluster, run the following command:
189+
190+
```azurecli-interactive
191+
az aks nodepool update --cluster-name myCluster --resource-group myResourceGroup --name mynodepool --disable-vtpm
192+
```
193+
194+
## Next steps
195+
196+
In this article, you learned how to enable trusted launch. Learn more about [trusted launch][trusted-launch-overview].
197+
198+
<!-- EXTERNAL LINKS -->
199+
200+
<!-- INTERNAL LINKS -->
201+
[install-azure-cli]: /cli/azure/install-azure-cli
202+
[az-feature-register]: /cli/azure/feature#az_feature_register
203+
[az-provider-register]: /cli/azure/provider#az-provider-register
204+
[az-feature-show]: /cli/azure/feature#az-feature-show
205+
[trusted-launch-overview]: ../virtual-machines/trusted-launch.md
206+
[secure-boot-overview]: /windows-hardware/design/device-experiences/oem-secure-boot
207+
[trusted-platform-module-overview]: /windows/security/information-protection/tpm/trusted-platform-module-overview
208+
[attestation-overview]: /windows/security/information-protection/tpm/tpm-fundamentals#measured-boot-with-support-for-attestation
209+
[microsoft-defender-for-cloud-overview]: ../defender-for-cloud/defender-for-cloud-introduction.md
210+
[az-aks-get-credentials]: /cli/azure/aks#az-aks-get-credentials
211+
[az-aks-create]: /cli/azure/aks#az-aks-create
212+
[az-aks-nodepool-add]: /cli/azure/aks/nodepool#az-aks-nodepool-add
213+
[az-aks-nodepool-update]: /cli/azure/aks/nodepool#az-aks-nodepool-update
214+
[azure-generation-two-virtual-machines]: ../virtual-machines/generation-2.md
215+
[verify-secure-boot-failures]: ../virtual-machines/trusted-launch-faq.md#verifying-secure-boot-failures
216+
[tusted-launch-ephemeral-os-sizes]: ../virtual-machines/ephemeral-os-disks.md#trusted-launch-for-ephemeral-os-disks
217+
[skip-gpu-driver-install]: gpu-cluster.md#skip-gpu-driver-installation-preview

0 commit comments

Comments
 (0)