Creating a Tencent TKE Cluster


You can use Rancher to create a cluster hosted in Tencent Kubernetes Engine (TKE). Rancher has already implemented and packaged the cluster driver for TKE, but by default, this cluster driver is inactive. In order to launch TKE clusters, you will need to enable the TKE cluster driver. After enabling the cluster driver, you can start provisioning TKE clusters.

Prerequisites in Tencent

Note Deploying to TKE will incur charges.

  1. Make sure that the account you will be using to create the TKE cluster has the appropriate permissions by referring to the Cloud Access Management documentation for details.

  2. Create a Cloud API Secret ID and Secret Key.

  3. Create a Private Network and Subnet in the region that you want to deploy your Kubernetes cluster.

  4. Create a SSH key pair. This key is used to access the nodes in the Kubernetes cluster.

Prerequisite in Rancher

You will need to enable the Tencent TKE cluster driver:

  1. Click ☰ > Cluster Management.
  2. Click Drivers.
  3. In the Cluster Drivers tab, go to the Tencent TKE cluster driver and click ⋮ > Activate.

When the cluster driver is finished downloading, you will be able to create Tencent TKE clusters in Rancher.

Create a TKE Cluster

  1. From the Clusters page, click Create.

  2. Choose Tencent TKE.

  3. Enter a Cluster Name.

  4. Use Member Roles to configure user authorization for the cluster. Click Add Member to add users that can access the cluster. Use the Role drop-down to set permissions for each user.

  5. Configure Account Access for the TKE cluster. Complete each drop-down and field using the information obtained in Prerequisites.

    OptionDescription
    RegionFrom the drop-down chooses the geographical region in which to build your cluster.
    Secret IDEnter the Secret ID that you obtained from the Tencent Cloud Console.
    Secret KeyEnter the Secret key that you obtained from Tencent Cloud Console.
  6. Click Next: Configure Cluster to set your TKE cluster configurations.

    OptionDescription
    Kubernetes VersionThe TKE only supports Kubernetes version 1.10.5 now.
    Node CountEnter the amount of worker node you want to purchase for your Kubernetes cluster, up to 100.
    VPCSelect the VPC name that you have created in the Tencent Cloud Console.
    Container Network CIDREnter the CIDR range of your Kubernetes cluster, you may check the available range of the CIDR in the VPC service of the Tencent Cloud Console. Default to 172.16.0.0/16.

    Note: If you are editing the cluster in the cluster.yml instead of the Rancher UI, note that, cluster configuration directives must be nested under the rancher_kubernetes_engine_config directive in cluster.yml. For more information, refer to the section on the config file structure in Rancher v2.3.0+.

  7. Click Next: Select Instance Type to choose the instance type that will use for your TKE cluster.

    OptionDescription
    Availability ZoneChoose the availability zone of the VPC region.
    SubnetSelect the Subnet that you have created within the VPC, and add a new one if you don’t have it in the chosen availability zone.
    Instance TypeFrom the drop-down chooses the VM instance type that you want to use for the TKE cluster, default to S2.MEDIUM4 (CPU 2 Memory 4 GiB).
  8. Click Next: Configure Instance to configure the VM instance that will use for your TKE cluster.

    OptionDescription
    Operating SystemThe name of the operating system, currently supports Centos7.2x86_64 or ubuntu16.04.1 LTSx86_64
    Security GroupSecurity group ID, default does not bind any security groups.
    Root Disk TypeSystem disk type. System disk type restrictions are detailed in the CVM instance configuration.
    Root Disk SizeSystem disk size. Linux system adjustment range is 20 - 50G, step size is 1.
    Data Disk TypeData disk type, default value to the SSD cloud drive
    Data Disk SizeData disk size (GB), the step size is 10
    Band Width TypeType of bandwidth, PayByTraffic or PayByHour
    Band WidthPublic network bandwidth (Mbps)
    Key PairKey id, after associating the key can be used to logging to the VM node
  9. Click Create.

Result:

Your cluster is created and assigned a state of Provisioning. Rancher is standing up your cluster.

You can access your cluster after its state is updated to Active.

Active clusters are assigned two Projects:

  • Default, containing the default namespace
  • System, containing the cattle-system, ingress-nginx, kube-public, and kube-system namespaces