This topic describes how to create a node pool of sandboxed containers and a node pool of Docker containers for an Alibaba Cloud Container Service for Kubernetes (ACK) cluster. ACK allows you to create node pools of different container runtime types for a cluster. However, all nodes in a node pool must use the same type of container runtime.

Prerequisites

An ACK cluster is created. For more information, see Create an ACK cluster.
Notice The ACK cluster must meet the following requirements:
  • The ACK version must be 1.14.6 aliyun.1 or later.
  • The ACK cluster must meet the following requirements:The network plug-in must be Flannel or Terway. Terway must run in One ENI for Multi-Pod mode.
  • The volume plug-in must be CSI 1.14.8.39-0d749258-aliyun or later. You cannot use Flexvolume.
  • The Logtail version must be 0.16.34.2-f6647154-aliyun or later.

Precautions

  • You can create up to 100 nodes for each cluster. To increase the quota of nodes, submit a ticket.
  • Before you add an existing Elastic Compute Service (ECS) instance deployed in a Virtual Private Cloud (VPC) network, make sure that an Elastic IP address is attached to the ECS instance, or a Network Address Translation (NAT) gateway is created in the same VPC network. In addition, you must make sure that the corresponding node can access the public network. Otherwise, you fail to add the ECS instance.

Create a node pool that supports Docker containers

  1. Log on to the ACK console.
  2. In the left-side navigation pane, choose Clusters > Clusters.
  3. Find the target cluster, click Node Pools in the Actions column.
  4. On the Node Pools page, click Create Node Pool, and then specify the required parameters.
    For more information, see Create an ACK cluster. The following table lists the parameters:
    Parameter Description
    Container Runtime Select Docker. This specifies that all containers in the node pool are Docker containers.
    Quantity Specify the initial number of nodes in the node pool. If you do not need to create nodes, select 0.
    Operating System Select an operating system for the nodes. Valid values: CentOS, AliyunLinux, and Windows.
  5. Click OK.

Create a node pool of sandboxed containers

  1. Log on to the ACK console.
  2. In the left-side navigation pane, choose Clusters > Clusters.
  3. Find the target cluster, click Node Pools in the Actions column.
  4. On the Node Pools page, click Create Node Pool, and then specify the required parameters.
    For more information, see Create an ACK cluster. The following table lists the parameters:
    Parameter Description
    Container Runtime Select security Sandbox. This specifies that all containers in the node pool are sandboxed containers.
    Quantity Specify the initial number of nodes in the node pool. If you do not need to create nodes, select 0.
    Billing Method Select Subscription. This is because sandboxed containers run only on ECS Bare Metal instances and ECS Bare Metal instances are only billed on the subscription basis.
    Mount Data Disk You must mount a data disk of 200 GiB or larger.
    Operating System Select AliyunLinux. Sandboxed containers support only the AliyunLinux operating system.
  5. Click OK.

Result

  • Check the status of the created node pool on the Node Pools page. If the status of the created node pool displays Activated, the node pool is created.
  • To view detailed information about the nodes in the node pool, connect to the ACK cluster where the node pool is deployed.
    1. On the Node Pools page, click the name of the newly created node pool. In the Node Pool Information section, find and record the Node Pool ID.Node ID
    2. Connect to the ACK cluster where the node pool is deployed. For more information, see Connect to Kubernetes clusters through kubectl.
    3. Run the following command to view detailed information about a specified node.
      kubectl get node --show-labels | grep -E "${node pool ID}|${node pool ID}"
      节点名称
    4. Run the following command to view more information about the nodes.
      kubectl get node -o wide | grep -E "${node name} {node name}"
      节点结果