This topic describes how to quickly create a Kubernetes cluster in the console.

Prerequisites

You have activated Container Service, Resource Orchestration Service (ROS), Auto Scaling (ESS), and Resource Access Management (RAM).

For more information about the procedure, see Create a cluster.

You can log on to the Container Service console, ROS console, RAM console, and ESS console to activate these services respectively.

Background information

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

Procedure

  1. Log on to the Container Service console.
  2. In the left-side navigation pane, choose Clusters > Clusters to go to the Clusters page.
  3. In the upper-right corner, click Create Kubernetes Cluster. In the Select Cluster Template dialog box that appears, select Standard Dedicated Cluster and click Create.
    You are redirected to the Dedicated Kubernetes tab.
  4. Set the parameters.

    This example uses the default values for most parameters, as shown in the following figure.

    Parameter Description
    Cluster Name The name must be 1 to 63 characters in length and can contain digits, Chinese characters, letters, and hyphens (-).
    Resource Group The resource group where the cluster belongs to.
    Region The region where the cluster is deployed.
    VPC The VPC network where the cluster is deployed.
    Select a VPC network from the drop-down list.
    • If the VPC network that you select already has a NAT gateway, Container Service will use this NAT gateway.
    • Otherwise, the system automatically creates a NAT gateway. If you do not want the system to automatically create a NAT gateway, clear the Configure SNAT for VPC check box.
      Note If you clear the check box, you need to create a NAT gateway or configure SNAT rules to enable Internet access to the VPC network. Otherwise, the cluster cannot be created.
    VSwitch The VSwitches of the cluster. You can select one to three VSwitches

    from the list. We recommend that you select three VSwitches.

    Node Type Supports pay-as-you-go and subscription nodes.
    Duration and Auto Renewal (Optional) You can select the subscription duration and renewal duration based on needs.
    Note The parameters only appear when you set Node Type to Subscription.
    Master Node You can set the instance quantity, instance type, and system disk.
    • Master Node Quantity: Select 3 or 5.
    • Instance Type: See Instance families.
    • System Disk: SSD disk and ultra disk are supported.
    Worker Node You can choose to create instances or add existing instances to the cluster. If you choose to create instances, configure the following settings:
    • Instance Type: You can select multiple instance types. For more information, see Instance families.
    • System Disk: SSD disk and ultra disk are supported.
    • Mount Data Disk: SSD disk, ultra disk, and basic disk are supported.
    Kubernetes Version and Container Runtime Supported Kubernetes versions and container runtimes are displayed. You can select versions based on needs.
    Note Do Not Translate
    Logon Type You can set a key pair or a password. For more information about key pairs, see Access Kubernetes clusters by using SSH key pairs.
    Network Plug-in Flannel and Terway are supported. Flannel is enabled by default.
    Pod CIDR Block and Service CIDR For more information about planning CIDR blocks, see Plan Kubernetes CIDR blocks under VPC.
    Configure SNAT Optional. If you clear this check box, you need to create a NAT gateway or configure SNAT rules to enable Internet access to the VPC network.
    Public Access
    • If you select this check box, an Elastic IP address is created and attached to the internal SLB instance. The 6443 port used by the API Server is enabled on master nodes. You can connect to the cluster by using kubeconfig through the Internet.
    • If you clear this check box, no Elastic IP address is created. You can only connect to the cluster by using kubeconfig from within the VPC network.
    SSH Logon (Optional)
    • If you select this check box, you can use SSH to connect to the cluster.
    • If you clear this check box, you cannot use SSH or kubectl to connect to the cluster. You can also enable SSH logon after the cluster is created. For more information, see Access Kubernetes clusters by using SSH.
    Note The parameter only appears when you enable Public Access.
    CloudMonitor Agent You can install the CloudMonitor agent on the nodes and view monitoring information about the nodes in the CloudMonitor console.
    Log Service If you enable Log Service, you can select an existing project or create a new one.

    If you select the Enable Log Service check box, the Log Service agent is automatically installed in the cluster. When you create an application, you can set up Log Service through a few simple steps. For more information, see Use Log Service to collect Kubernetes cluster logs.

    RDS Whitelist Add the IP addresses of nodes to the RDS whitelist.
    Node Protection This check box is selected by default to prevent nodes from being deleted through the console and APIs.
    Labels Attach labels to the nodes.
    Note
    • Key is required. Value is optional.
    • The key cannot start with any of the following strings: "aliyun", "http://", and "https://". It is case insensitive and can contain up to 64 characters.
    • The value cannot start with string "http://" or "https://". It is optional, case insensitive, and can contain up to 63 characters.
    • The key must be unique among the labels attached to the same resource. If you specify a duplicate key when you create a label, the existing label will be overwritten.
    • You can attach up to 20 labels to each resource. To attach more labels, you must remove existing labels first.
    Advanced Options
    • Pods on Each Node: The maximum number of Pods running on a single node.
    • Kube-proxy Mode: iptables and IPVS are supported.
      • iptables is a mature and stable service that uses iptables rules to configure service discovery and load balancing. It provides average performance and is significantly affected by the cluster size. This mode is suitable for clusters running a small number of services.
      • IPVS provides high performance and uses IP Virtual Server (IPVS) to configure service discovery and load balancing. This mode is suitable for clusters running a large number of services. We recommend that you use this mode in scenarios where high load balancing performance is required.
    • CPU Policy: Set the CPU policy.
      • none: The default policy, which represents the existing scheduling behavior.
      • static: This policy allows Pods with certain resource characteristics to be granted increased CPU affinity and exclusivity on the node.
    • Set the node port range. The default port range is 30000 to 32767.
    • Cluster CA: Set whether to enable Custom Cluster CA.

      If you select this check box, the CA certificate is added to the Kubernetes cluster, which secures the communication between the server and client.

    • Workflow Engine: Set whether to enable AGS.
      • If you select this check box, the system automatically installs the AGS workflow plug-in when it creates the cluster.
      • If you clear this check box, you need to manually install the AGS workflow plug-in. For more information, see Introduction to AGS CLI.
  5. Click Create Cluster to start the deployment.
    After the cluster is created, you can find the cluster on the Clusters page in the console.