Creating a Cluster

Last updated: 2019-09-18 17:57:36

PDF

Operation Scenario

When creating a cluster, you can use both new CVMs and existing CVMs as the initial nodes. This article guides you through these two cluster creation methods.

Notes on the OS

  • Change to the OS only take effect for newly added or reinstalled nodes, but not for existing nodes.
  • Currently, you can only change an OS to one of the same type, for example, CentOS > CentOS-type custom image.
  • To use the custom image feature, apply by Submitting a Ticket.

If you use the custom image feature, create custom images based on the basic image provided by TKE.

Directions

Entering Cluster Information

  1. Log in to the TKE Console.
  2. In the left sidebar, click Clusters to go to the cluster management page.
  3. On the cluster management page, click Create. this is shown in the following figure:
  4. On the Create a Cluster page, configure the basic information of the cluster. This is shown in the following figure:
    Create a Cluster
  • Cluster Name: The name of the cluster to be created, with a length limited to 60 characters.
  • Project: Select based on actual needs. Newly added resources will be automatically assigned to this project.
  • Kubernetes Version: Multiple Kubernetes versions are provided. For a comparison of the features of different versions, see Supported Versions of Kubernetes Documentation.
  • Region: Select the closest region based on your location. This helps minimize access latency and improve download speed.
  • Cluster Network: Assigns an IP address that is within the node’s network address range to the CVMs in the cluster. For details, see Container and Node Network Configuration.
  • Container Network: Assigns an IP address that is within the container’s network address range to the containers in the cluster. For details, see Container and Node Network Configuration.
  • Cluster Description: Enter the information about the cluster, which will be displayed on the Cluster Information page.
  • Advanced Settings: You can set IPVS.
    IPVS is suitable for scenarios where large-scale services are run in a cluster. It cannot be disabled after being enabled. For operation details, see Enabling IPVS in a Cluster.
  1. Click Next.

Selecting a Model

  1. In Select a Model, determine whether to create a cluster using an existing CVM. This is shown in the following figure:

Using an Existing CVM to Create a Cluster

When using an existing CVM to create a cluster, you must pay attention to the following points:

  • The selected CVM must be reinstalled. After reinstallation, the data on the CVM system disk will be erased.
  • The selected CVM will be migrated to the project to which the cluster belongs.
  • Migrating a CVM to another project will cause the original security group to be unbound. You must rebind the security group.
  1. In Select a model, select the deployment mode and model. This is shown in the following figure:

    Main parameters include:
  • Master: The deployment method of Master determines the management mode for your cluster. We provide two cluster hosting modes you can choose from. For more information, see Cluster Overview.
  • Node: Node configured here is the worker node that is actually used by the cluster to run services. You can purchase a CVM as the node when you create the cluster, or you can add the node after the cluster creation.
  • Master&Etcd Model: Select the CVM according to the following requirements.
    -The selected CVM must have at least 4-core CPU, and at least 3 CVMs must be selected.
    • The CVM cannot be the node of another TKE cluster.
    • The CVM status must be Running.
    • You can select across availability zones.
  • Node Model: This can be selected when Node is selected as Add New. You can also add a node after the cluster is created.
  1. Click Next, Configure the CVM.

Not Using an Existing CVM to Create a Cluster

  1. In Select a model, select the deployment mode and model. This is shown in the following figure:
    Select a model
    Main parameters include:
  • Master: The deployment method of Master determines the management mode for your cluster. We provide two cluster hosting modes you can choose from. For more information, see Cluster Overview.
  • Node: The node configured here is the worker node that is actually used by the cluster to run services. You can purchase a CVM as the node when you create the cluster, or you can add the nodes after the cluster creation.
  • Billing Mode: This provides the Pay as you go billing mode. For more information, see Billing Mode.
  • Master&Etcd Model:
    • Availability Zone: You can select multiple availability zones at the same time to deploy your Master or Etcd to ensure the higher availability of the cluster.
    • Node Network: You can select multiple subnets at the same time to deploy your Master or Etcd to ensure the higher availability of the cluster.
    • Model: Select a model with at least 4-core CPU. For more information about how to select an appropriate model, see Instance Type Overview and Selecting a CVM Configuration Scheme.
    • System Disk: You can select a local disk, HDD cloud disk, SSD cloud disk, or premium cloud disk according to the availability zone and model. For more information about storage media selections, see Storage Overview.
    • Data disk: As it is recommended not to deploy other applications in the Master and Etcd, no data disk is configured for it by default. You can add a cloud disk to it after purchase.
    • Public network bandwidth: Select Assign Free Public IP and the system will assign a public IP for free. Bill-by-traffic mode is provided. For more information, see Public Network Billing Method.
  • Node Model: This can be selected when Node is selected as Add New.
    • Availability Zone: You can select multiple availability zones at the same time to deploy your Master or Etcd nodes to ensure the higher availability of the cluster.
    • Node Network: You can select multiple subnet resources at the same time to deploy your Master or Etcd nodes to ensure the higher availability of the cluster.
    • Model: For information about how to select a model, see Instance Type Overview and Selecting a CVM Configuration Scheme.
    • System Disk: You can select a local disk, HDD cloud disk, SSD cloud disk, or premium cloud disk according to the availability zone and model. For more information about storage media selections, see Storage Overview.
    • Data disk: As it is recommended not to deploy other applications in the Master, no data disk is configured for it by default. You can add a cloud disk to it after purchase. You can configure the data disk while purchasing a node.
    • Public network bandwidth: Select Assign Free Public IP and the system will assign a public IP for free. Bill-by-traffic mode is provided. For more information, see Public Network Billing Method.
    • Number:Set to >=3 units.
  1. Click Next, Configure CVM.

Configuring a CVM

  1. In CVM Configuration, configure the CVM. This is shown in the following figure:
    CVM Configuration
    Main parameters include:
  • Data Disk Mounting: Select based on actual needs.
  • Security Group: The security group has a firewall functions, which is used to set the network access control for the CVM. For more information, see TKE Security Group Settings.
  • Login Method: Three login methods are available.
    • Set a Password: Set a corresponding password as prompted.
    • SSH Key Pair: A key pair is a pair of parameters generated by an algorithm. It is a more secure way to log in to a CVM instance than regular passwords. For more information, see SSH Key.
    • Random Password: A password will be automatically generated and sent to you through internal message.
  • Automatic Adjustment: A scaling group with a maximum of 2 nodes can be created automatically.
  1. Click Next to check and confirm the configuration information.
  2. Click Finish.