• Cloud Container Engine

cce
  1. Help Center
  2. Cloud Container Engine
  3. User Guide
  4. Getting Started
  5. Creating a Container Cluster

Creating a Container Cluster

Container clusters are used to run containers.

By default, each user can create a maximum of two container clusters.

A maximum of 15 nodes are allowed in a single container cluster. Every node is an elastic cloud server with multiple EVS disks (one 40-GB system disk and at least one user data disk).

Create a container cluster on which your containerized application will run.

Using an example, this section describes how to create the single-node cluster gbk for the Guestbook application.

Prerequisites

  • A valid AK/SK file has been uploaded to CCE.

    For details about how to upload AK/SK files, see Uploading an AK/SK File.

  • A VPC with available subnets has been created.

    For details about how to create VPCs, see Creating a VPC.

  • An SSH key has been created.

    For details about how to create SSH keys, see Creating a Key Pair.

Procedure

  1. Create a container cluster.

    1. In the navigation pane of the CCE console, choose Cluster Manager. On the Cluster Manager page, click Create Container Cluster.
    2. In the Create Container Cluster dialog box, specify parameters of the container cluster.
      Figure 1 Specifying container cluster parameters
      • Name
        Name of the container cluster to be created. In the Guestbook example, the cluster name is gbk.
        NOTE:

        A container cluster name must begin with a lowercase letter and contain only lowercase letters, digits, and hyphens (-).

      • VPC

        VPC where the container cluster will be located.

      • Subnet

        Subnet where nodes in the container cluster will run.

      • Security Group

        Security group of the container cluster.

        Values:

        • Automatic: A security group is automatically selected for the container cluster and named in the format of cce-auto-created-sg-cluster-<cluster_name>.
        • Custom: A custom security group is manually selected for the container cluster. The selected security group must already have the rules listed in Table 1.
          NOTE:
          • For more information about security groups and security group rules, see Help Center > Virtual Private Cloud > User Guide > Security > Security Group on the management console.
          • Custom security groups cannot be named in the format of cce-auto-created-sg-cluster-<cluster_name>.
          Table 1 CCE security group rules

          Protocol

          Transfer Direction

          Port Range

          Source IP Address

          Security group rules for clusters and cluster-related functions

          TCP

          inbound

          4194

          subnet

          TCP

          inbound

          5001-5002

          subnet

          TCP

          inbound

          10250

          subnet

          TCP

          inbound

          10255

          subnet

          UDP

          inbound

          8472

          subnet

          TCP

          inbound

          5443

          subnet

          TCP

          inbound

          4003

          subnet

          TCP

          inbound

          4505-4506

          subnet

          TCP

          inbound

          22

          subnet

          Security group rules for applications and application access

          any

          outbound

          any

          0.0.0.0/0

          TCP

          inbound

          30000-32767

          0.0.0.0/0

          The Subnet in security group rules must be the subnet in which the container cluster will be located.

        In the Guestbook example, the Automatic option is selected.

      • Cluster Type

        Type of the newly created cluster.

        Values:

        • Single Master: The cluster has only one master.
        • HA Master: The cluster has three masters. The cluster is considered to be available only if at least two of the masters are available. If two or three masters fail, the whole cluster becomes unavailable.
        NOTE:

        Each master occupies 4 CPU cores and 16-GB memory.

        In the Guestbook example, Single Master is selected.

    3. Click OK.

      A tab with the name of the newly created container cluster appears on the Cluster Manager page.

  2. On the tab page of the newly created container cluster, click Add Node.

    The Add Node page is then displayed.

    Figure 2 Add Node page



  3. On the Add Node page, specify node parameters.

    • AZ

      Availability zone in which the new node will be located.

    • Node Type

      Type of the elastic cloud server that will be used as a node.

      The following is the recommended use scenario of every node type:

      • General-purpose

        Applications have no special requirements on CPUs, memory, disks, and bandwidth, but have high requirements on security and reliability. Customers require low initial investment and maintenance costs.

      • Computing I

        Applications have high requirements on bandwidth and require online data backhaul in real time and storage- or ECS-based video content processing.

      • Computing II

        Applications have high requirements on computing performance and storage capacity.

      • Memory-optimized

        Applications require large memory and rapid data switching and processing. They process large volumes of frequently accessed data.

      In the Guestbook example, the node type is Computing II.

    • Specifications

      vCPU and memory capacity of the node.

      By default, the following amount of vCPU and memory resources on a node are consumed to manage the node:

      • Operating system consumes 340-MB memory.
      • The node agent on the first node of the container cluster consumes 0.71-core vCPU and 170-MB memory.
      • The node agent on each of the remaining nodes consumes 0.4-core vCPU and 170-MB memory.

      Your containerized applications will use the remaining vCPU and memory resources on the node.

      The minimum node specifications are 1 core (vCPU) and 2048 MB (memory). The maximum node specifications are 32 cores (vCPU) and 256 GB (memory).

      In the Guestbook example, the node specifications are c2.large.

    • Quantity

      The number of nodes you will buy to run containers.

      A node is an elastic cloud server armed with two EVS disks.

      In the Guestbook example, only one node is required.

    • Disk

      EVS disks are classified into system and data disks.

      EVS disks deliver three levels of I/O performance:

      • Common I/O: EVS disks that use Serial Advanced Technology Attachment (SATA).
      • High I/O: EVS disks that use serial attached SCSI (SAS).
      • Ultra-high I/O: EVS disks that use solid state disk (SSD).

      By default, a new node comes with one system disk and one data disk. You can click Add Data Disk to add a maximum of nine more data disks.

      Do not perform risky operations (such as detaching a disk and deleting files) on the default system disk and default data disk. Otherwise, your container clusters will run improperly.

      Capacity of the system disk is hard-coded to be 40 GB.

      Capacity of the data disk is user configurable and ranges from 100 GB to 32768 GB (inclusive). The default capacity is 100 GB.

      In the Guestbook example, the default value is retained.

    • EIP

      If Yes is selected, an EIP will be bound to the node. Ensure that the EIP quota is sufficient.

      In the Guestbook example, the EIP parameter is set to Yes.

    • Tag

      Key-value pairs used to identify node resource (ECS, EVS, and EIP) attributes. You can view these tags on ECS, EVS, and EIP consoles.

      • Key: 1 to 36 characters long. Only uppercase letters, lowercase letters, digits, hyphens (-), underscores (_), and Unicode characters are allowed.
      • Value: 1 to 43 characters long. Only uppercase letters, lowercase letters, digits, periods (.), hyphens (-), underscores (_), and Unicode characters are allowed.

      Each node can have a maximum of 10 tags. A default tag (the key is CCE_Cluster and the value is the cluster name) is automatically created for each node. Click Delete to delete the default tag if you do not want it.

      By way of example, the default tag is used.

    • Key Pair

      The key pair name specified in Creating a Key Pair.

    • Price Calculator

      You can quickly know the estimated cost before deploying nodes.

  4. On the Specify Details page, click Buy Now.
  5. On the Confirm Specifications page, review the cluster information and click Submit.

    It takes about 15 to 20 minutes to create a node. If the Status of the newly created node is Available, the node has been created successfully.