Skip to content

Commit 58d5b0f

Browse files
Merge pull request #280386 from allyford/update-fips
Update fips
2 parents c8d9f28 + f208da8 commit 58d5b0f

File tree

1 file changed

+149
-3
lines changed

1 file changed

+149
-3
lines changed

articles/aks/enable-fips-nodes.md

Lines changed: 149 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ The Federal Information Processing Standard (FIPS) 140-2 is a US government stan
1414

1515
## Prerequisites
1616

17-
* Azure CLI version 2.32.0 or later installed and configured. Run `az --version` to find the version. For more information about installing or upgrading the Azure CLI, see [Install Azure CLI][install-azure-cli].
17+
* Azure CLI version 2.32.0 or later installed and configured. To find the version, run `az --version`. For more information about installing or upgrading the Azure CLI, see [Install Azure CLI][install-azure-cli].
1818

1919
> [!NOTE]
2020
> AKS Monitoring Addon supports FIPS enabled node pools with Ubuntu, Azure Linux, and Windows starting with Agent version 3.1.17 (Linux) and Win-3.1.17 (Windows).
@@ -29,7 +29,7 @@ The Federal Information Processing Standard (FIPS) 140-2 is a US government stan
2929

3030

3131
> [!IMPORTANT]
32-
> The FIPS-enabled Linux image is a different image than the default Linux image used for Linux-based node pools. To enable FIPS on a node pool, you must create a new Linux-based node pool. You can't enable FIPS on existing node pools.
32+
> The FIPS-enabled Linux image is a different image than the default Linux image used for Linux-based node pools.
3333
>
3434
> FIPS-enabled node images may have different version numbers, such as kernel version, than images that aren't FIPS-enabled. The update cycle for FIPS-enabled node pools and node images may differ from node pools and images that aren't FIPS-enabled.
3535
@@ -45,7 +45,7 @@ The below table includes the supported OS versions:
4545
|Windows|Windows Server 2019| Supported|
4646
|Windows| Windows Server 2022| Supported|
4747

48-
When requesting FIPS enabled Ubuntu, if the default Ubuntu version does not support FIPS, AKS will default to the most recent FIPS-supported version of Ubuntu. For example, Ubuntu 22.04 is default for Linux node pools. Since 22.04 does not currently support FIPS, AKS will default to Ubuntu 20.04 for Linux FIPS-enabled nodepools.
48+
When requesting FIPS enabled Ubuntu, if the default Ubuntu version does not support FIPS, AKS will default to the most recent FIPS-supported version of Ubuntu. For example, Ubuntu 22.04 is default for Linux node pools. Since 22.04 does not currently support FIPS, AKS defaults to Ubuntu 20.04 for Linux FIPS-enabled nodepools.
4949

5050
> [!NOTE]
5151
> Previously, you could use the GetOSOptions API to determine whether a given OS supported FIPS. The GetOSOptions API is now deprecated and it will no longer be included in new AKS API versions starting with 2024-05-01.
@@ -146,6 +146,152 @@ FIPS-enabled node pools also have a *kubernetes.azure.com/fips_enabled=true* lab
146146
147147
FIPS-enabled node pools also have a *kubernetes.azure.com/fips_enabled=true* label, which deployments can use to target those node pools.
148148
149+
## Update an existing node pool to enable or disable FIPS (preview)
150+
151+
Existing node pools can be updated to enable or disable FIPS. If you are planning to migrate your node pools from non-FIPS to FIPS, first validate that your application is working properly in a test environment before migrating it to a production environment. Validating your application in a test environment should prevent issues caused by the FIPS kernel blocking some weak cipher or encryption algorithm, such as an MD4 algorithm that is not FIPS compliant.
152+
153+
> [!NOTE]
154+
> When updating an existing Linux node pool to enable or disable FIPS, the node pool update will move between the fips and non-fips image. This node pool update will trigger a reimage to complete the update. This may cause the node pool update to take a few minutes to complete.
155+
156+
### Prerequisites
157+
158+
* Azure CLI version 2.56.0 or later, together with the [aks-preview](https://github.com/cli/azure/azure-cli-extensions-list) extension installed and configured. To find the version, run `az --version`. If you need to install or upgrade, see [Install Azure CLI][install-azure-cli].
159+
160+
[!INCLUDE [preview features callout](~/reusable-content/ce-skilling/azure/includes/aks/includes/preview/preview-callout.md)]
161+
162+
### Install the `aks-preview` Azure CLI extension
163+
164+
* Register or update the aks-preview extension using the [`az extension add`][az-extension-add] or [`az extension update`][az-extension-update] command.
165+
166+
```azurecli-interactive
167+
# Register the aks-preview extension
168+
az extension add --name aks-preview
169+
170+
# Update the aks-preview extension
171+
az extension update --name aks-preview
172+
```
173+
174+
### Register the `MutableFipsPreview` feature flag
175+
176+
1. Register the `MutableFipsPreview` feature flag using the [`az feature register`][az-feature-register] command.
177+
178+
```azurecli-interactive
179+
az feature register --namespace "Microsoft.ContainerService" --name "MutableFipsPreview"
180+
```
181+
182+
It takes a few minutes for the status to show *Registered*.
183+
184+
2. Verify the registration status using the [`az feature show`][az-feature-show] command.
185+
186+
```azurecli-interactive
187+
az feature show --namespace "Microsoft.ContainerService" --name "MutableFipsPreview"
188+
```
189+
190+
3. When the status reflects *Registered*, refresh the registration of the *Microsoft.ContainerService* resource provider using the [`az provider register`][az-provider-register] command.
191+
192+
```azurecli-interactive
193+
az provider register --namespace Microsoft.ContainerService
194+
```
195+
196+
### Enable FIPS on an existing node pool
197+
Existing node pools can be updated to enable FIPS. When you update an existing node pool, the node image will change from the current image to the recommended FIPS image of the same OS SKU.
198+
199+
1. Update a node pool using the [`az aks nodepool update`][az-aks-nodepool-update] command with the `--enable-fips-image` parameter.
200+
201+
```azurecli-interactive
202+
az aks nodepool update \
203+
--resource-group myResourceGroup \
204+
--cluster-name myAKSCluster \
205+
--name np \
206+
--enable-fips-image
207+
```
208+
209+
The above command triggers a reimage of the node pool immediately to deploy the FIPS compliant Operating System. This reimage occurs during the node pool update. No additional steps are required.
210+
211+
2. Verify that your node pool is FIPS-enabled using the [`az aks show`][az-aks-show] command and query for the *enableFIPS* value in *agentPoolProfiles*.
212+
213+
```azurecli-interactive
214+
az aks show \
215+
--resource-group myResourceGroup \
216+
--name myAKSCluster \
217+
--query="agentPoolProfiles[].{Name:name enableFips:enableFips}" \
218+
-o table
219+
```
220+
221+
The following example output shows that the *np* node pool is FIPS-enabled:
222+
223+
```output
224+
Name enableFips
225+
--------- ------------
226+
np True
227+
nodepool1 False
228+
```
229+
230+
3. List the nodes using the `kubectl get nodes` command.
231+
232+
```azurecli-interactive
233+
kubectl get nodes
234+
```
235+
236+
The following example output shows a list of the nodes in the cluster. The nodes starting with `aks-np` are part of the FIPS-enabled node pool.
237+
238+
```output
239+
NAME STATUS ROLES AGE VERSION
240+
aks-np-12345678-vmss000000 Ready agent 6m4s v1.19.9
241+
aks-np-12345678-vmss000001 Ready agent 5m21s v1.19.9
242+
aks-np-12345678-vmss000002 Ready agent 6m8s v1.19.9
243+
aks-nodepool1-12345678-vmss000000 Ready agent 34m v1.19.9
244+
```
245+
246+
4. Run a deployment with an interactive session on one of the nodes in the FIPS-enabled node pool using the `kubectl debug` command.
247+
248+
```azurecli-interactive
249+
kubectl debug node/aks-np-12345678-vmss000000 -it --image=mcr.microsoft.com/dotnet/runtime-deps:6.0
250+
```
251+
252+
5. From the interactive session output, verify the FIPS cryptographic libraries are enabled. Your output should look similar to the following example output:
253+
254+
```output
255+
root@aks-np-12345678-vmss000000:/# cat /proc/sys/crypto/fips_enabled
256+
1
257+
```
258+
259+
FIPS-enabled node pools also have a *kubernetes.azure.com/fips_enabled=true* label, which deployments can use to target those node pools.
260+
261+
## Disable FIPS on an existing node pool
262+
Existing Linux node pools can be updated to disable FIPS. When updating an existing node pool, the node image will change from the current FIPS image to the recommended non-FIPS image of the same OS SKU. The node image change will occur after a reimage.
263+
264+
1. Update a Linux node pool using the [`az aks nodepool update`][az-aks-nodepool-update] command with the `--disable-fips-image` parameter.
265+
266+
```azurecli-interactive
267+
az aks nodepool update \
268+
--resource-group myResourceGroup \
269+
--cluster-name myAKSCluster \
270+
--name np \
271+
--disable-fips-image
272+
```
273+
274+
The above command triggers a reimage of the node pool immediately to deploy the FIPS compliant Operating System. This reimage occurs during the node pool update. No additional steps are required.
275+
276+
2. Verify that your node pool is not FIPS-enabled using the [`az aks show`][az-aks-show] command and query for the *enableFIPS* value in *agentPoolProfiles*.
277+
278+
```azurecli-interactive
279+
az aks show \
280+
--resource-group myResourceGroup \
281+
--name myAKSCluster \
282+
--query="agentPoolProfiles[].{Name:name enableFips:enableFips}" \
283+
-o table
284+
```
285+
286+
The following example output shows that the *np* node pool is not FIPS-enabled:
287+
288+
```output
289+
Name enableFips
290+
--------- ------------
291+
np False
292+
nodepool1 False
293+
```
294+
149295
## Next steps
150296
151297
To learn more about AKS security, see [Best practices for cluster security and upgrades in Azure Kubernetes Service (AKS)][aks-best-practices-security].

0 commit comments

Comments
 (0)