Help Center> Cloud Container Engine> Getting Started> Creating a Kubernetes Cluster

Creating a Kubernetes Cluster

Context

This section describes how to quickly create a CCE cluster. For details, see Buying a CCE Cluster. In this example, the default or simple configurations are in use.

Creating a Cluster

  1. Log in to the CCE console.

    • If you have not created a cluster, a wizard page is displayed. Click Create under CCE cluster.
    • If you have created a cluster, choose Clusters from the navigation pane on the left and click Buy next to CCE cluster.

  2. On the Configure Cluster page, configure cluster parameters.

    In this example, a majority of parameters retain default values. Only mandatory parameters are described. For details, see Table 1.
    Table 1 Parameters for creating a cluster

    Parameter

    Description

    Basic Settings

    *Cluster Name

    Name of the cluster to be created. A cluster name contains 4 to 128 characters starting with a lowercase letter and not ending with a hyphen (-). Only lowercase letters, digits, and hyphens (-) are allowed.

    * Enterprise Project

    This parameter is displayed only for enterprise users who have enabled Enterprise Project Management.

    * Cluster Version

    Cluster version. Cluster's Kubernetes baseline version. The latest version is recommended.

    * Cluster Scale

    Maximum number of worker nodes that can be managed by the cluster. If you select 50 nodes, the cluster can manage a maximum of 50 worker nodes.

    *Control node number

    The default value is 3.

    Network Settings

    * Network Model

    Retain the default settings.

    *VPC

    VPC where the cluster will be located.

    If no VPC is available, click Create VPC to create one. After the VPC is created, click refresh.

    * Master Node Subnet

    Subnet where master nodes of the cluster are located.

    *Container Network Segment

    Retain the default value.

  3. The selected cluster specifications are displayed on the right of the page. Select a billing mode and click Pay Now.

    Wait until the cluster is created.

    The created cluster will be displayed on the Clusters page, and the number of nodes in the cluster is 0.

    Figure 1 Successful cluster creation

Creating a Node

After a cluster is created, you need to create nodes in the cluster to run workloads.

  1. Log in to the CCE console.
  2. Click the created cluster.
  3. In the navigation pane, choose Nodes. Click Create Node in the upper right corner and set node parameters.

    The following describes only important parameters. For other parameters, retain the defaults.

    Compute Settings

    • AZ: Retain the default value.
    • Node Type: Select Elastic Cloud Server (VM).
    • Specifications: Select node specifications that fit your business needs.
    • OS: Select the operating system (OS) of the nodes to be created.
    • Node Name: Enter a node name.
    • Login Mode: Use a password or key pair to log in to the node.
      • If the login mode is Password: The default username is root. Enter the password for logging to the node and confirm the password.

        Please remember the node login password. If you forget the password, the system is unable to retrieve your password and you will have to reset the password.

      • If the login mode is Key pair, select a key pair for logging to the node and select the check box to acknowledge that you have obtained the key file and without this file you will not be able to log in to the node.

        A key pair is used for identity authentication when you remotely log in to a node. If no key pair is available, click Create Key Pair. For details on how to create a key pair, see Creating a Key Pair.

    Storage Settings

    • System Disk: Set disk type and capacity based on site requirements. The default disk capacity is 50 GB.
    • Data Disk: Set disk type and capacity based on site requirements. The default disk capacity is 100 GB.

    Network Settings

    • VPC: Use the default value, that is, the subnet selected during cluster creation.
    • Node Subnet: Select a subnet in which the node runs.

  4. At the bottom of the page, select the node quantity and billing mode, and click Next: Confirm.
  5. Review the node specifications, read the instructions, select I have read and understand the preceding instructions, and click Submit.

    Wait until the node is created.

    The created node will be displayed on the Nodes page.

    Figure 2 Node created successfully