All Products
Search
Document Center

Container Service for Kubernetes:Create a managed Kubernetes cluster

Last Updated:May 18, 2023

This topic describes how to create a managed Kubernetes cluster in the Container Service for Kubernetes (ACK) console.

Prerequisites

Background information

The following example shows how to create a managed Kubernetes cluster. Default values and minimal configurations are used in specific settings.

For more information about the limits of ACK clusters, see Create an ACK managed cluster.

Procedure

  1. Log on to the ACK console and click Clusters in the left-side navigation pane.

  2. In the upper-right corner of the Clusters page, click Create Kubernetes Cluster.
  3. Set the parameters.

    Default values are used for most parameters in this example. The following table describes the parameters.

    1. Set the parameters on the Cluster Configurations wizard page.

      Parameter

      Description

      Cluster Name

      Enter a name for the cluster.
      Note The name must be 1 to 63 characters in length, and can contain digits, letters, hyphens (-), and underscores (_). The name cannot start with an underscore (_).

      Cluster Specification

      Select a cluster type. You can select Professional or Standard edition. We that you use ACK Pro clusters in the production environment and test environment. ACK standard clusters are applicable to the learning and testing needs of individual users.

      Region

      Select a region to deploy the cluster.

      All Resources

      Move the pointer over All Resources at the top of the page and select the resource group that you want to use. After you select a resource group, virtual private clouds (VPCs) and vSwitches are filtered based on the selected resource group. When you create a cluster, only the VPCs and vSwitches that belong to the selected resource group are displayed in the console. Resource Group

      All Resources is selected in this example.

      Kubernetes Version

      Use the default setting.

      Container Runtime

      The Docker runtime is selected in this example. For more information about the differences among Docker, containerd, and Sandboxed-Container, see Comparison of Docker, containerd, and Sandboxed-Container.

      VPC

      Set the virtual private cloud (VPC) where you want to deploy the cluster.

      Select a VPC to deploy the cluster. Standard VPCs and shared VPCs are supported.
      • Shared VPC: The owner of a VPC (resource owner) can share the vSwitches in the VPC with other accounts in the same organization.
      • Standard VPC: The owner of a VPC (resource owner) cannot share the vSwitches in the VPC with other accounts.
      Note ACK clusters support only VPCs. You can select a VPC from the drop-down list. If no VPC is available, click Create VPC to create one. For more information, see Create and manage a VPC.

      vSwitch

      Select vSwitches.

      You can select up to three vSwitches that are deployed in different zones. If no vSwitch is available, click Create vSwitch to create one. For more information, see Create and manage a vSwitch.

      Network Plug-in

      By default, Terway is selected. For more information about Flannel and Terway, see Work with Terway.

      IP Addresses per Node

      The default value is 64.

      If you select Flannel as the network plug-in, you must set IP Addresses per Node.
      Note
      • IP Addresses per Node specifies the maximum number of IP addresses that can be assigned to each node. We recommend that you use the default value.
      • After you select the VPC and specify the number of IP addresses per node, recommended values are automatically generated for Pod CIDR Block and Service CIDR. The system also provides the maximum number of nodes that can be deployed in the cluster and the maximum number of pods that can be deployed on each node. You can modify the values based on your business requirements.

      Pod CIDR Block

      If you select Flannel as the network plug-in, you must set Pod CIDR Block.

      The CIDR block specified by Pod CIDR Block cannot overlap with that of the VPC or those of the existing clusters in the VPC. The CIDR block cannot be modified after the cluster is created. The Service CIDR block cannot overlap with the pod CIDR block. For more information about how to plan CIDR blocks for an ACK cluster, see Plan CIDR blocks for an ACK cluster.

      Service CIDR

      Set Service CIDR. The CIDR block specified by Service CIDR cannot overlap with that of the VPC or those of the existing clusters in the VPC. The CIDR block cannot be modified after the cluster is created. The Service CIDR block cannot overlap with the pod CIDR block. For more information about how to plan CIDR blocks for an ACK cluster, see Plan CIDR blocks for an ACK cluster.

      Configure SNAT

      By default, Configure SNAT for VPC is selected.

      By default, an ACK cluster cannot access the Internet. If the VPC that you select for the cluster cannot access the Internet, you can select Configure SNAT for VPC. This way, ACK will create a NAT gateway and configure SNAT rules to enable Internet access for the VPC.

      Access to API Server

      By default, an internal-facing SLB instance is created for the Kubernetes API server of the cluster. You can modify the specification of the SLB instance. For more information, see Instance specifications.
      Important If you delete the SLB instance, you cannot access the Kubernetes API server of the cluster.

      By default, Expose API Server with EIP is not selected. The default setting is used in this example.

      Specify whether to enable Expose API Server with EIP. The ACK API server provides multiple HTTP-based RESTful APIs, which can be used to create, delete, modify, query, and monitor resources, such as pods and Services.
      • If you select this check box, an elastic IP address (EIP) is created and associated with an SLB instance. Port 6443 used by the API server is opened on control planes. You can connect to and manage the cluster by using kubeconfig files over the Internet.
      • If you clear this check box, no EIP is created. You can connect to and manage the cluster by using kubeconfig files only from within the VPC.

      RDS Whitelist

      Configure the whitelist of the ApsaraDB RDS instance. Add the IP addresses of nodes in the cluster to a whitelist of the ApsaraDB RDS instance.
      Note To enable an ApsaraDB RDS instance to access the cluster, you must make sure that the instance is deployed in the VPC where the cluster is deployed.

      By default, RDS whitelist is not configured.

      Security Group

      You can select Create Basic Security Group, Create Advanced Security Group, or Select Existing Security Group. For more information about security groups, see Overview.
      Note
      • To enable the Select Existing Security Group option, apply to be added to the whitelist in Quota Center.
      • If you select an existing security group, the system does not automatically configure security group rules. This may cause errors when you access the nodes in the cluster. You must manually configure security group rules. For more information, see Configure security group rules to enforce access control on ACK clusters.

      By default, Create Advanced Security Group is selected. The default setting is used in this example.

      Show Advanced Options

      The advanced settings of the cluster are not configured in this example. For more information about the advanced settings of an ACK cluster, see Configure advanced settings for a cluster.

    2. Click Next:Node Pool Configurations to configure the node pool.

      Parameter

      Description

      Worker Instance

      Specify whether to use existing Elastic Compute Service (ECS) instances or create ECS instances. By default, Create Instance is selected.

      Node Pool Name

      The name of the node pool.
      Note The name must be 1 to 63 characters in length, and can contain digits, letters, and hyphens (-).

      Billing Method

      By default, Pay-As-You-Go is selected. The pay-as-you-go and subscription billing methods are supported.

      Instance Type

      You can select multiple instance types. For more information, see Overview of instance families.

      Selected Types

      The selected instance types are displayed.

      Quantity

      Specify the number of worker nodes (ECS instances) to be created.

      System Disk

      By default, Ultra Disk is selected. The default storage capacity is 120 GiB.

      Mount Data Disk

      By default, this option is not selected.

      ESSDs, standard SSDs, and ultra disks are supported. The disk types that you can select depend on the instance types that you select. For more information about the disk types supported by different instance types, see Overview of instance families. Disk types that are not displayed in the drop-down list are not supported by the instance types that you select.
      Note
      • If you select ESSD as the system disk type, you can set a custom performance level for the system disk. You can select higher performance levels for ESSDs with larger storage capacities. For example, you can select performance level 2 for an ESSD with a storage capacity of more than 460 GiB. You can select performance level 3 for an ESSD with a storage capacity of more than 1,260 GiB. For more information, see Capacity and PLs.
      • The Encrypt Disk option is available only for ESSDs. Data disks support only the aes-256 encryption algorithms. The China (Nanjing - Local Region), China (Fuzhou - Local Region), Thailand (Bangkok), and South Korea (Seoul) regions support only the Default Service CMK for data disk encryption. The Bring Your Own Key (BYOK) feature is not supported by these regions. For more information about data disk encryption, see Encrypt a data disk.
      • The maximum number of data disks that can be mounted depends on the instance types that you select. You can view the selected data disks and the remaining number of data disks that you can mount on the right side of Mount Data Disk.

      Operating System

      By default, Alibaba Cloud Linux 2.1903 is selected.

      Logon Type

      • Key pair logon
        • Key Pair: Select an SSH key pair from the drop-down list.
        • create a key pair: Create an SSH key pair if none is available. For more information about how to create an SSH key pair, see Create an SSH key pair. After the key pair is created, set it as the credential that is used to log on to the cluster.
      • Password logon
        • Password: Enter the password that is used to log on to the nodes.
        • Confirm Password: Enter the password again.
        Note The password must be 8 to 30 characters in length, and must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters. The password cannot contain underscores (_).

      Advanced settings of worker nodes

      The advanced settings of worker nodes are not configured in this example. For more information about the advanced settings of an ACK cluster, see Configure advanced settings for a cluster.

    3. Click Next:Component Configurations to configure components on the Component Configurations wizard page.

      Parameter

      Description

      Ingress

      By default, Install Ingress Controllers is selected. Select Public Network for SLB Network Type.

      Volume Plug-in

      By default, CSI is selected. For more information about the Flexvolume and CSI plug-ins, see CSI overview.

      Monitoring Agents

      Specify whether to install the CloudMonitor agent. By default, Install CloudMonitor Agent on ECS Instance and Enable Prometheus Monitoring are selected. After the CloudMonitor agent is installed on ECS nodes, you can view monitoring data about the nodes in the CloudMonitor console.

      The CloudMonitor agent is not installed in this example.

      Log Service

      Specify whether to enable Log Service. You can select an existing Log Service project or create one. By default, Enable Log Service is selected. When you create an application, you can enable Log Service with a few steps. For more information, see Collect log data from containers by using Log Service.

      By default, Install node-problem-detector and Create Event Center is selected. You can specify whether to enable the Kubernetes event center in the Log Service console. For more information, see Create and use an event center.

      Log Service is enabled in this example.

      Log Collection for Control Plane Components

      If you select Enable, the logs of control plane components are collected to the specified Log Service project that belongs to the current account. For more information, see Collect the logs of control plane components in ACK Pro clusters.

    4. Click Next:Confirm Order.

    5. Read Terms of Service, select the check box, and then click Create Cluster.

      Note It requires about 10 minutes to create an ACK cluster with multiple nodes.