You can retrieve Elastic Compute Service (ECS) metadata, such as instance IDs, VPC information, and network interface card (NIC) information, from within an ECS instance using the Metadata Service. By default, nodes in an ACK cluster can access instance metadata in both normal and enhanced modes. You can switch to enhanced mode only (IMDSv2) to improve the security of the instance metadata service.
After you switch to enhanced mode only, applications on the node cannot access the ECS instance metadata service in normal mode. For more information about ECS instance metadata access modes, see Instance metadata.
Prerequisites
An ACK managed cluster or an ACK dedicated cluster that runs version 1.28 or later. To upgrade a cluster, see Manually upgrade a cluster.
If the components in the following table are installed in your cluster, make sure that their versions and the cluster version meet the minimum requirements for enhanced mode only.
If you have applications deployed in the cluster that depend on the instance metadata service, you must modify the application code before you switch to enhanced mode only. After the switch, requests that use the normal mode are denied. For more information, see Instance metadata.
Procedure
You can configure this feature only when you create a node pool or configure a node pool during cluster creation. After the node pool is created, you cannot change the instance metadata access mode.
The following procedure uses the creation of a new node pool as an example. The core configuration items are the same as those required when you create a cluster.
Log on to the ACK console. In the left navigation pane, click Clusters.
On the Clusters page, find the cluster to manage and click its name. In the left navigation pane, choose .
Click Create Node Pool and follow the on-screen instructions to create the node pool.
This section describes only the core configuration items for this feature. For more information about all configuration items, see Create and manage a node pool.
Operating System: Make sure that the operating system image supports enhanced mode only and that the image version meets the requirements.
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
Custom Image: Make sure that the cloud-init version installed in the image is 23.2.2 or later. For more information about how to check and upgrade the cloud-init version, see Install cloud-init.
Instance Metadata Access Mode: Select Security Hardening Mode.