All Products
Search
Document Center

Container Compute Service:Create virtual nodes and update the vSwitch configuration

Last Updated:Dec 03, 2025

Node objects in ACS clusters are provided as virtual nodes. When you create a cluster, ACS automatically creates virtual nodes in the selected zones, with one virtual node in each zone. To distribute resources, ensure sufficient compute power, or increase the number of vSwitch IP addresses, you can create additional virtual nodes. This helps resolve these issues while maintaining high availability of your cluster.

Scenarios

By default, ACS creates a virtual node in each selected zone when creating an ACS cluster. ACS pods are scheduled to these virtual nodes based on the scheduling policy. Each pod occupies a private vSwitch IP address. You might need to create additional virtual nodes in the following scenarios:

  • Cluster high availability: In certain business scenarios (such as distributed tasks), you might need to deploy pods across multiple zones to ensure high availability.

  • Insufficient Compute Power: The current virtual nodes cannot provide sufficient compute power of a specific type to meet your business requirements. You need to add zones with adequate compute power.

  • Insufficient IP Addresses: Due to business expansion and inadequate network planning, the vSwitches in the current virtual nodes do not have enough available IP addresses. You need to add vSwitches to the cluster.

Prerequisites

A vSwitch is created in the newly added zone of the cluster VPC. For more information, see Create and manage a vSwitch.

Note

Each virtual node corresponds to a zone. You cannot create more than one virtual node for a zone. You can check the zones of the existing virtual nodes on the Virtual Nodes page of the cluster.

Limits

Virtual nodes do not support custom labels, annotations, or taints.

Method 1: Create a virtual node in the console

The ACS console lets you create virtual nodes in a visual way. You can perform the following steps to create virtual nodes. ACS will automatically update the vSwitch configuration.

Note

After a new virtual node is created, ACS automatically updates the vSwitchIds configuration in acs-profile to add the new vSwitch.

  1. Log on to the ACS console.

  2. On the Clusters, click the name of the cluster to go to the cluster management page.

  3. In the navigation pane on the left, click Virtual Nodes.

  4. On the Virtual Nodes page, click Create Virtual Node.

  5. In the vSwitch section, select a vSwitch and click OK.

    The following list provides more details:

    • The system automatically displays existing vSwitches in the VPC of the cluster. You can also click Create vSwitch to create a new vSwitch in the VPC console.

    • We recommend that you use the suggested resource configuration. ACS will display zones with sufficient compute power based on the compute class that you specified.

    • Each virtual node corresponds to a zone. You cannot create more than one virtual node for a zone.

    Important

    The resource recommendation feature categorizes vSwitches into three types:

    • Unavailable: These vSwitches cannot be directly selected in the console, indicating that the corresponding zones do not support ACS compute power.

    • Recommended: After you select a ComputeClass or GPU card type in the resource configuration recommendation list, vSwitches with highlighted zones indicate that the corresponding zones have sufficient resources of the selected type.

    • Others: After you select a ComputeClass or GPU card type in the resource configuration recommendation list, vSwitches without highlighted zones but still selectable indicate that the corresponding zones have fewer resources than the "Recommended" zones, or the resources are limited.

    ACS clusters support pods with various compute types. We recommend that you select at least one "Recommended" zone based on your compute type requirements.

    image

  6. Confirm that the status of the virtual node is Active.

Method 2: Modify the vSwitchIds configuration in acs-profile

Each virtual node corresponds to one zone. If a vSwitch is configured for a zone that does not have a corresponding virtual node in the cluster, the system automatically creates one. Therefore, you can trigger the automatic creation of a virtual node by updating the acs-profile and adding a vSwitch ID to the vSwitchIds field.

Note

You can also automatically delete a virtual node by removing the ID of its corresponding vSwitch from vSwitchIds. Before you perform this operation, make sure that no pods are deployed on the virtual node that you want to delete.

Console

  1. Log on to the ACS console.

  2. On the Clusters, click the name of the cluster to go to the cluster management page.

  3. Modify the vSwitchIds configuration in acs-profile.

    1. In the navigation pane on the left, choose Configurations > ConfigMaps.

    2. On the ConfigMap page, select kube-system from the Namespace drop-down list.

    3. Find acs-profile and click Edit.

    4. In the vSwitchIds field, enter the new vSwitch ID and click OK.

      Note

      Separate multiple vSwitch IDs with commas (,). ACS will automatically create virtual nodes for the zones of the newly added vSwitches if they do not have virtual nodes.

      更新交换机.png

  4. Confirm that a virtual node is created.

    1. In the navigation pane on the left, click Virtual Nodes.

    2. On the Virtual Nodes page, confirm that a new virtual node is automatically created and its status is Active.

kubectl

  1. Connect to your ACS cluster. For more information, see Obtain the kubeconfig file of a cluster and connect to the cluster using kubectl or Use kubectl on CloudShell to manage Kubernetes clusters.

  2. Confirm the status of the virtual node.

    kubectl get node

    The following figure shows a sample output:

    NAME                            STATUS   ROLES   AGE   VERSION
    virtual-kubelet-cn-shanghai-g   Ready    agent   17d   v1.30.1-alibaba.13+ae02e00117a549
    virtual-kubelet-cn-shanghai-l   Ready    agent   17d   v1.30.1-alibaba.13+ae02e00117a549
    virtual-kubelet-cn-shanghai-m   Ready    agent   19d   v1.30.1-alibaba.13+ae02e00117a549
  3. Modify the vSwitchIds configuration in acs-profile.

    1. Modify acs-profile.

      kubectl edit cm -n kube-system acs-profile
    2. In the vSwitchIds field, add the new vSwitch ID.

      Note

      Separate multiple vSwitch IDs with commas (,). ACS will automatically create virtual nodes for the zones of the newly added vSwitches if they do not have virtual nodes.

      data:
        enableClusterIp: "true"
        enableHybridMode: "false"
        enableLinuxArm64Node: "false"
        enableLogController: "false"
        enablePVCController: "true"
        enablePrivateZone: "false"
        enableReuseSSLKey: "false"
        enableUpdatePodResourceController: "false"
        enableWindowsAmd64Node: "false"
        featureGates: ProtectionFinalizers=false
        resourceGroupId: ""
        securityGroupId: sg-uf61931oi1w4te******
        selectors: ""
        slsMachineGroup: ""
        vSwitchIds: vsw-uf68xih52l5inkm******,vsw-uf67n6lumryq7li******,vsw-uf6i6bsihi3sger******,vsw-uf6g4yjk3kemgei******
    3. Save the modifications and exit.

  4. Confirm that a new virtual node is created.

    kubectl get node

    The following sample output shows that a new virtual node named virtual-kubelet-cn-shanghai-e is added.

    NAME                            STATUS   ROLES   AGE   VERSION
    virtual-kubelet-cn-shanghai-e   Ready    agent   8s    v1.30.1-alibaba.13+ae02e00117a549
    virtual-kubelet-cn-shanghai-g   Ready    agent   17d   v1.30.1-alibaba.13+ae02e00117a549
    virtual-kubelet-cn-shanghai-l   Ready    agent   17d   v1.30.1-alibaba.13+ae02e00117a549
    virtual-kubelet-cn-shanghai-m   Ready    agent   19d   v1.30.1-alibaba.13+ae02e00117a549