By default, ECS nodes in an ACK cluster support both normal mode and enhanced mode (IMDSv2) for accessing instance metadata such as instance IDs, VPC information, and network interface card (NIC) information. You can switch to enhanced mode only (IMDSv2) to improve the security of the instance metadata service.
After switching to enhanced mode only, requests using normal mode are rejected. If you have applications in the cluster that depend on the instance metadata service, you must update the application code to use IMDSv2 before making this change.
Prerequisites
Before you begin, ensure that you have:
An ACK managed cluster or an ACK dedicated cluster running version 1.28 or later. To upgrade, see Manually upgrade a cluster
Any installed components listed in the following tables at or above the minimum version required for enhanced mode only
Any applications that call the IMDS updated to use IMDSv2 (token-based requests). For details on how IMDSv2 works, see Instance metadata
Enable enhanced mode only
You can only set the instance metadata access mode when creating a node pool or configuring a node pool during cluster creation. You cannot change it after the node pool is created. The following procedure uses node pool creation as an example. The configuration items are the same when you create a cluster.
Log on to the ACK console. In the left navigation pane, click Clusters.
On the Clusters page, click the name of your cluster. In the left navigation pane, click .
Click Create Node Pool and configure the node pool. For all configuration items, see Create and manage a node pool. The following items are specific to this feature:
Operating System: Select an image that supports enhanced mode only and meets the minimum version requirement.
Public image
Operating system image
Minimum version
Container-optimized Alibaba Cloud Linux 3.2104 LTS 64-bit
20241226
Alibaba Cloud Linux 3.2104 LTS 64-bit
20241218
Ubuntu 22.04
20250722
ContainerOS 3.6
20250916
Make sure the cloud-init version in the image is 23.2.2 or later. To check and upgrade cloud-init, see Install cloud-init.
Instance Metadata Access Mode: Select Security Hardening Mode.