Skip to content

Commit 493a8a8

Browse files
committed
update fips
1 parent b3b71b0 commit 493a8a8

File tree

1 file changed

+140
-0
lines changed

1 file changed

+140
-0
lines changed

articles/aks/enable-fips-nodes.md

Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,146 @@ 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 Linux node pool to enable or disable FIPS (preview)
150+
151+
### Limitations
152+
- FIPS cannot be enabled via node pool update for for Windows node pools
153+
154+
[!INCLUDE [preview features callout](~/reusable-content/ce-skilling/azure/includes/aks/includes/preview/preview-callout.md)]
155+
156+
### Install the `aks-preview` Azure CLI extension
157+
158+
* Register or update the aks-preview extension using the [`az extension add`][az-extension-add] or [`az extension update`][az-extension-update] command.
159+
160+
```azurecli-interactive
161+
# Register the aks-preview extension
162+
az extension add --name aks-preview
163+
164+
# Update the aks-preview extension
165+
az extension update --name aks-preview
166+
```
167+
168+
### Register the `UpdateFIPSPreview` feature flag
169+
170+
1. Register the `UpdateFIPSPreview` feature flag using the [`az feature register`][az-feature-register] command.
171+
172+
```azurecli-interactive
173+
az feature register --namespace "Microsoft.ContainerService" --name "UpdateFIPSPreview"
174+
```
175+
176+
It takes a few minutes for the status to show *Registered*.
177+
178+
2. Verify the registration status using the [`az feature show`][az-feature-show] command.
179+
180+
```azurecli-interactive
181+
az feature show --namespace "Microsoft.ContainerService" --name "UpdateFIPSPreview"
182+
```
183+
184+
3. When the status reflects *Registered*, refresh the registration of the *Microsoft.ContainerService* resource provider using the [`az provider register`][az-provider-register] command.
185+
186+
```azurecli-interactive
187+
az provider register --namespace Microsoft.ContainerService
188+
```
189+
190+
### Enable FIPS on an existing Linux node pool
191+
Existing Linux node pools can be updated to enable FIPS. When updating an existing node pool, the node image will change from the current image to the recommended FIPS image of the same OS SKU. The node image change will occur after a re-image.
192+
193+
1. Update a Linux node pool using the [`az aks nodepool update`][az-aks-nodepool-update] command with the `--enable-fips-image` parameter.
194+
195+
```azurecli-interactive
196+
az aks nodepool update \
197+
--resource-group myResourceGroup \
198+
--cluster-name myAKSCluster \
199+
--name np \
200+
--enable-fips-image
201+
```
202+
203+
2. Re-image your node pool to complete the change from a non-fips image to a fips image.
204+
205+
3. Verify your node pool is FIPS-enabled using the [`az aks show`][az-aks-show] command and query for the *enableFIPS* value in *agentPoolProfiles*.
206+
207+
```azurecli-interactive
208+
az aks show \
209+
--resource-group myResourceGroup \
210+
--name myAKSCluster \
211+
--query="agentPoolProfiles[].{Name:name enableFips:enableFips}" \
212+
-o table
213+
```
214+
215+
The following example output shows the *np* node pool is FIPS-enabled:
216+
217+
```output
218+
Name enableFips
219+
--------- ------------
220+
np True
221+
nodepool1 False
222+
```
223+
224+
4. List the nodes using the `kubectl get nodes` command.
225+
226+
```azurecli-interactive
227+
kubectl get nodes
228+
```
229+
230+
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.
231+
232+
```output
233+
NAME STATUS ROLES AGE VERSION
234+
aks-np-12345678-vmss000000 Ready agent 6m4s v1.19.9
235+
aks-np-12345678-vmss000001 Ready agent 5m21s v1.19.9
236+
aks-np-12345678-vmss000002 Ready agent 6m8s v1.19.9
237+
aks-nodepool1-12345678-vmss000000 Ready agent 34m v1.19.9
238+
```
239+
240+
5. Run a deployment with an interactive session on one of the nodes in the FIPS-enabled node pool using the `kubectl debug` command.
241+
242+
```azurecli-interactive
243+
kubectl debug node/aks-np-12345678-vmss000000 -it --image=mcr.microsoft.com/dotnet/runtime-deps:6.0
244+
```
245+
246+
6. From the interactive session output, verify the FIPS cryptographic libraries are enabled. Your output should look similar to the following example output:
247+
248+
```output
249+
root@aks-np-12345678-vmss000000:/# cat /proc/sys/crypto/fips_enabled
250+
1
251+
```
252+
253+
FIPS-enabled node pools also have a *kubernetes.azure.com/fips_enabled=true* label, which deployments can use to target those node pools.
254+
255+
## Disable FIPS on an existing node pool
256+
Existing Linux node pools can be updated to enable FIPS. When updating an existing node pool, the node image will change from the current image to the recommended FIPS image of the same OS SKU. The node image change will occur after a re-image.
257+
258+
1. Update a Linux node pool using the [`az aks nodepool update`][az-aks-nodepool-update] command with the `--disable-fips-image` parameter.
259+
260+
```azurecli-interactive
261+
az aks nodepool update \
262+
--resource-group myResourceGroup \
263+
--cluster-name myAKSCluster \
264+
--name np \
265+
--disable-fips-image
266+
```
267+
268+
2. Re-image your node pool to complete the change from a fips image to a non-fips image.
269+
270+
3. Verify your node pool is not FIPS-enabled using the [`az aks show`][az-aks-show] command and query for the *enableFIPS* value in *agentPoolProfiles*.
271+
272+
```azurecli-interactive
273+
az aks show \
274+
--resource-group myResourceGroup \
275+
--name myAKSCluster \
276+
--query="agentPoolProfiles[].{Name:name enableFips:enableFips}" \
277+
-o table
278+
```
279+
280+
The following example output shows the *np* node pool is not FIPS-enabled:
281+
282+
```output
283+
Name enableFips
284+
--------- ------------
285+
np False
286+
nodepool1 False
287+
```
288+
149289
## Next steps
150290
151291
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)