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.
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.
Create a Cloud API Secret ID and Secret Key.
Create a Private Network and Subnet in the region that you want to deploy your Kubernetes cluster.
Create a SSH key pair. This key is used to access the nodes in the Kubernetes cluster.
Create a TKE Cluster
From the Clusters page, click Add Cluster.
Choose Tencent TKE.
Enter a Cluster Name.
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.
Configure Account Access for the TKE cluster. Complete each drop-down and field using the information obtained in Prerequisites.
Option Description Region From the drop-down chooses the geographical region in which to build your cluster. Secret ID Enter the Secret ID that you obtained from the Tencent Cloud Console. Secret Key Enter the Secret key that you obtained from Tencent Cloud Console. Click
Next: Configure Cluster
to set your TKE cluster configurations.Option Description Kubernetes Version The TKE only supports Kubernetes version 1.10.5 now. Node Count Enter the amount of worker node you want to purchase for your Kubernetes cluster, up to 100. VPC Select the VPC name that you have created in the Tencent Cloud Console. Container Network CIDR Enter 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 therancher_kubernetes_engine_config
directive incluster.yml
. For more information, refer to the section on the config file structure in Rancher v2.3.0+.Click
Next: Select Instance Type
to choose the instance type that will use for your TKE cluster.Option Description Availability Zone Choose the availability zone of the VPC region. Subnet Select 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 Type From 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). Click
Next: Configure Instance
to configure the VM instance that will use for your TKE cluster.Option Description Operating System The name of the operating system, currently supports Centos7.2x86_64 or ubuntu16.04.1 LTSx86_64 Security Group Security group ID, default does not bind any security groups. Root Disk Type System disk type. System disk type restrictions are detailed in the CVM instance configuration. Root Disk Size System disk size. Linux system adjustment range is 20 - 50G, step size is 1. Data Disk Type Data disk type, default value to the SSD cloud drive Data Disk Size Data disk size (GB), the step size is 10 Band Width Type Type of bandwidth, PayByTraffic or PayByHour Band Width Public network bandwidth (Mbps) Key Pair Key id, after associating the key can be used to logging to the VM node 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 thedefault
namespaceSystem
, containing thecattle-system
,ingress-nginx
,kube-public
, andkube-system
namespaces