How to create Tencent TKE with Pulumi?TypeScript
To create a Tencent Kubernetes Engine (TKE) with Pulumi, we can use the
volcenginepackage. The 'volcengine.vke.Kubeconfig' resource allows us to authenticate our Pulumi program with the VKE cluster, enabling us to provision Kubernetes workloads on the cluster using Pulumi.
Here is a sample program to create a VKE cluster:
Note: Before running this program, you need to setup your Tencent Cloud credentials. Please find more details here.
In this program, we instantiate a Kubeconfig from the
volcenginepackage and provide the clusterId for the VKE cluster.
typeproperty of "Public" means we want to authenticate with the public endpoint of the VKE cluster. The
validDurationproperty specifies the validity duration of the kubeconfig in hours.
Finally, we export the kubeconfig to be used for provisioning workloads on the VKE cluster.
The cluster ID(
clusterId) can be obtained from the Tencent Cloud console. The specific steps can be found in the Tencent Cloud documentation for Obtaining Instance ID.
your-cluster-idwith your actual cluster ID in this program.
After running this Pulumi program, you would be able to manage your Tencent Kubernetes Cluster using Pulumi.