Updated on 2026-09-18 GMT+08:00

Adding or Deleting Pod Subnets

Scenario

If the pod subnet fails to meet your service requirements, you can add or delete pod subnets as needed.

Pod subnets can be deleted only when the cluster version is v1.27.8-r0, v1.28.6-r0, or later.

Adding Pod Subnets

  1. Log in to the CCE console and click the cluster name to go to the cluster console.
  2. On the Overview page, go to the Networking Configuration area and click Edit next to Default Container Subnet.

    Figure 1 Adding subnets

  3. Select one or more pod subnets in the same VPC. If no subnet is available, go to the VPC console and create one first.

    Figure 2 Selecting subnets

  4. Click OK.

Deleting Pod Subnets

Deleting a pod subnet is a high-risk operation. Ensure that no network interfaces are using the subnet to be deleted.

On the cluster overview page, view the cluster ID in the Basic Info area. In the Networking Configuration > Default Container Subnet area, copy the subnet ID of the pod subnet to be deleted. Then, use this ID to filter the network interfaces and supplementary network interfaces associated with this subnet on the Network Interfaces tab. If the name or description of any filtered network interfaces contains the cluster ID, the network interfaces are being used by the cluster.

  1. Log in to the CCE console and click the cluster name to go to the cluster console.
  2. In the navigation pane, choose Cluster > Settings, and then switch to the Network tab.
  3. In the Container Network area, click Update in the Operation column of default-network (Default Container Subnet).
  4. For Pod Subnet, deselect the subnets and click OK.

    Figure 3 Deselecting subnets

Precautions for Deleting a Pod Subnet for a CCE Autopilot Cluster

When deleting a pod subnet, pay attention to the following:

  • After a subnet is deleted, the following network interfaces can be automatically deleted:
    • Network interfaces used by pods without a fixed IP address are automatically reclaimed when the pods are deleted.
    • Network interfaces used by pods with fixed IP addresses are automatically reclaimed after the pods are deleted and the fixed IP addresses expire.
    • The in-use eth1 network interface is automatically reclaimed when the node is deleted or reset.
  • After a subnet is deleted, the network interfaces that have been allocated will not be automatically reclaimed. Ensure that no network interfaces are using the subnet to be deleted in the current cluster.

    To find out if any network interfaces are being used by a cluster, copy the ID of the subnet that you plan to delete. Then, use this ID to filter the network interfaces and supplementary network interfaces associated with the subnet on the Network Interfaces tab. If the name or description of any of the filtered network interfaces or supplementary network interfaces contains a cluster ID, it means that they are being used by the cluster.