tencentcloud.KubernetesCluster
Explore with Pulumi AI
Example Usage
Create a basic cluster with two worker nodes
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const config = new pulumi.Config();
const defaultInstanceType = config.get("defaultInstanceType") || "SA2.2XLARGE16";
const availabilityZoneFirst = config.get("availabilityZoneFirst") || "ap-guangzhou-3";
const availabilityZoneSecond = config.get("availabilityZoneSecond") || "ap-guangzhou-4";
const exampleClusterCidr = config.get("exampleClusterCidr") || "10.31.0.0/16";
const vpcOne = tencentcloud.getVpcSubnets({
isDefault: true,
availabilityZone: availabilityZoneFirst,
});
const firstVpcId = vpcOne.then(vpcOne => vpcOne.instanceLists?.[0]?.vpcId);
const firstSubnetId = vpcOne.then(vpcOne => vpcOne.instanceLists?.[0]?.subnetId);
const vpcTwo = tencentcloud.getVpcSubnets({
isDefault: true,
availabilityZone: availabilityZoneSecond,
});
const secondVpcId = vpcTwo.then(vpcTwo => vpcTwo.instanceLists?.[0]?.vpcId);
const secondSubnetId = vpcTwo.then(vpcTwo => vpcTwo.instanceLists?.[0]?.subnetId);
const sg = new tencentcloud.SecurityGroup("sg", {});
const sgId = sg.securityGroupId;
const _default = tencentcloud.getImages({
imageTypes: ["PUBLIC_IMAGE"],
imageNameRegex: "Final",
});
const imageId = _default.then(_default => _default.imageId);
const sgRule = new tencentcloud.SecurityGroupLiteRule("sgRule", {
securityGroupId: sg.securityGroupId,
ingresses: [
"ACCEPT#10.0.0.0/16#ALL#ALL",
"ACCEPT#172.16.0.0/22#ALL#ALL",
"DROP#0.0.0.0/0#ALL#ALL",
],
egresses: ["ACCEPT#172.16.0.0/22#ALL#ALL"],
});
const example = new tencentcloud.KubernetesCluster("example", {
vpcId: firstVpcId,
clusterCidr: exampleClusterCidr,
clusterMaxPodNum: 32,
clusterName: "tf_example_cluster",
clusterDesc: "example for tke cluster",
clusterMaxServiceNum: 32,
clusterInternet: false,
clusterInternetSecurityGroup: sgId,
clusterVersion: "1.22.5",
clusterDeployType: "MANAGED_CLUSTER",
workerConfigs: [
{
count: 1,
availabilityZone: availabilityZoneFirst,
instanceType: defaultInstanceType,
systemDiskType: "CLOUD_SSD",
systemDiskSize: 60,
internetChargeType: "TRAFFIC_POSTPAID_BY_HOUR",
internetMaxBandwidthOut: 100,
publicIpAssigned: true,
subnetId: firstSubnetId,
dataDisks: [{
diskType: "CLOUD_PREMIUM",
diskSize: 50,
}],
enhancedSecurityService: false,
enhancedMonitorService: false,
userData: "dGVzdA==",
password: "ZZXXccvv1212",
},
{
count: 1,
availabilityZone: availabilityZoneSecond,
instanceType: defaultInstanceType,
systemDiskType: "CLOUD_SSD",
systemDiskSize: 60,
internetChargeType: "TRAFFIC_POSTPAID_BY_HOUR",
internetMaxBandwidthOut: 100,
publicIpAssigned: true,
subnetId: secondSubnetId,
dataDisks: [{
diskType: "CLOUD_PREMIUM",
diskSize: 50,
}],
enhancedSecurityService: false,
enhancedMonitorService: false,
userData: "dGVzdA==",
keyIds: ["skey-11112222"],
camRoleName: "CVM_QcsRole",
},
],
labels: {
test1: "test1",
test2: "test2",
},
});
import pulumi
import pulumi_tencentcloud as tencentcloud
config = pulumi.Config()
default_instance_type = config.get("defaultInstanceType")
if default_instance_type is None:
default_instance_type = "SA2.2XLARGE16"
availability_zone_first = config.get("availabilityZoneFirst")
if availability_zone_first is None:
availability_zone_first = "ap-guangzhou-3"
availability_zone_second = config.get("availabilityZoneSecond")
if availability_zone_second is None:
availability_zone_second = "ap-guangzhou-4"
example_cluster_cidr = config.get("exampleClusterCidr")
if example_cluster_cidr is None:
example_cluster_cidr = "10.31.0.0/16"
vpc_one = tencentcloud.get_vpc_subnets(is_default=True,
availability_zone=availability_zone_first)
first_vpc_id = vpc_one.instance_lists[0].vpc_id
first_subnet_id = vpc_one.instance_lists[0].subnet_id
vpc_two = tencentcloud.get_vpc_subnets(is_default=True,
availability_zone=availability_zone_second)
second_vpc_id = vpc_two.instance_lists[0].vpc_id
second_subnet_id = vpc_two.instance_lists[0].subnet_id
sg = tencentcloud.SecurityGroup("sg")
sg_id = sg.security_group_id
default = tencentcloud.get_images(image_types=["PUBLIC_IMAGE"],
image_name_regex="Final")
image_id = default.image_id
sg_rule = tencentcloud.SecurityGroupLiteRule("sgRule",
security_group_id=sg.security_group_id,
ingresses=[
"ACCEPT#10.0.0.0/16#ALL#ALL",
"ACCEPT#172.16.0.0/22#ALL#ALL",
"DROP#0.0.0.0/0#ALL#ALL",
],
egresses=["ACCEPT#172.16.0.0/22#ALL#ALL"])
example = tencentcloud.KubernetesCluster("example",
vpc_id=first_vpc_id,
cluster_cidr=example_cluster_cidr,
cluster_max_pod_num=32,
cluster_name="tf_example_cluster",
cluster_desc="example for tke cluster",
cluster_max_service_num=32,
cluster_internet=False,
cluster_internet_security_group=sg_id,
cluster_version="1.22.5",
cluster_deploy_type="MANAGED_CLUSTER",
worker_configs=[
{
"count": 1,
"availability_zone": availability_zone_first,
"instance_type": default_instance_type,
"system_disk_type": "CLOUD_SSD",
"system_disk_size": 60,
"internet_charge_type": "TRAFFIC_POSTPAID_BY_HOUR",
"internet_max_bandwidth_out": 100,
"public_ip_assigned": True,
"subnet_id": first_subnet_id,
"data_disks": [{
"disk_type": "CLOUD_PREMIUM",
"disk_size": 50,
}],
"enhanced_security_service": False,
"enhanced_monitor_service": False,
"user_data": "dGVzdA==",
"password": "ZZXXccvv1212",
},
{
"count": 1,
"availability_zone": availability_zone_second,
"instance_type": default_instance_type,
"system_disk_type": "CLOUD_SSD",
"system_disk_size": 60,
"internet_charge_type": "TRAFFIC_POSTPAID_BY_HOUR",
"internet_max_bandwidth_out": 100,
"public_ip_assigned": True,
"subnet_id": second_subnet_id,
"data_disks": [{
"disk_type": "CLOUD_PREMIUM",
"disk_size": 50,
}],
"enhanced_security_service": False,
"enhanced_monitor_service": False,
"user_data": "dGVzdA==",
"key_ids": ["skey-11112222"],
"cam_role_name": "CVM_QcsRole",
},
],
labels={
"test1": "test1",
"test2": "test2",
})
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
defaultInstanceType := "SA2.2XLARGE16"
if param := cfg.Get("defaultInstanceType"); param != "" {
defaultInstanceType = param
}
availabilityZoneFirst := "ap-guangzhou-3"
if param := cfg.Get("availabilityZoneFirst"); param != "" {
availabilityZoneFirst = param
}
availabilityZoneSecond := "ap-guangzhou-4"
if param := cfg.Get("availabilityZoneSecond"); param != "" {
availabilityZoneSecond = param
}
exampleClusterCidr := "10.31.0.0/16"
if param := cfg.Get("exampleClusterCidr"); param != "" {
exampleClusterCidr = param
}
vpcOne, err := tencentcloud.GetVpcSubnets(ctx, &tencentcloud.GetVpcSubnetsArgs{
IsDefault: pulumi.BoolRef(true),
AvailabilityZone: pulumi.StringRef(availabilityZoneFirst),
}, nil)
if err != nil {
return err
}
firstVpcId := vpcOne.InstanceLists[0].VpcId
firstSubnetId := vpcOne.InstanceLists[0].SubnetId
vpcTwo, err := tencentcloud.GetVpcSubnets(ctx, &tencentcloud.GetVpcSubnetsArgs{
IsDefault: pulumi.BoolRef(true),
AvailabilityZone: pulumi.StringRef(availabilityZoneSecond),
}, nil)
if err != nil {
return err
}
_ := vpcTwo.InstanceLists[0].VpcId
secondSubnetId := vpcTwo.InstanceLists[0].SubnetId
sg, err := tencentcloud.NewSecurityGroup(ctx, "sg", nil)
if err != nil {
return err
}
sgId := sg.SecurityGroupId
_default, err := tencentcloud.GetImages(ctx, &tencentcloud.GetImagesArgs{
ImageTypes: []string{
"PUBLIC_IMAGE",
},
ImageNameRegex: pulumi.StringRef("Final"),
}, nil)
if err != nil {
return err
}
_ := _default.ImageId
_, err = tencentcloud.NewSecurityGroupLiteRule(ctx, "sgRule", &tencentcloud.SecurityGroupLiteRuleArgs{
SecurityGroupId: sg.SecurityGroupId,
Ingresses: pulumi.StringArray{
pulumi.String("ACCEPT#10.0.0.0/16#ALL#ALL"),
pulumi.String("ACCEPT#172.16.0.0/22#ALL#ALL"),
pulumi.String("DROP#0.0.0.0/0#ALL#ALL"),
},
Egresses: pulumi.StringArray{
pulumi.String("ACCEPT#172.16.0.0/22#ALL#ALL"),
},
})
if err != nil {
return err
}
_, err = tencentcloud.NewKubernetesCluster(ctx, "example", &tencentcloud.KubernetesClusterArgs{
VpcId: pulumi.String(firstVpcId),
ClusterCidr: pulumi.String(exampleClusterCidr),
ClusterMaxPodNum: pulumi.Float64(32),
ClusterName: pulumi.String("tf_example_cluster"),
ClusterDesc: pulumi.String("example for tke cluster"),
ClusterMaxServiceNum: pulumi.Float64(32),
ClusterInternet: pulumi.Bool(false),
ClusterInternetSecurityGroup: pulumi.String(sgId),
ClusterVersion: pulumi.String("1.22.5"),
ClusterDeployType: pulumi.String("MANAGED_CLUSTER"),
WorkerConfigs: tencentcloud.KubernetesClusterWorkerConfigArray{
&tencentcloud.KubernetesClusterWorkerConfigArgs{
Count: pulumi.Float64(1),
AvailabilityZone: pulumi.String(availabilityZoneFirst),
InstanceType: pulumi.String(defaultInstanceType),
SystemDiskType: pulumi.String("CLOUD_SSD"),
SystemDiskSize: pulumi.Float64(60),
InternetChargeType: pulumi.String("TRAFFIC_POSTPAID_BY_HOUR"),
InternetMaxBandwidthOut: pulumi.Float64(100),
PublicIpAssigned: pulumi.Bool(true),
SubnetId: pulumi.String(firstSubnetId),
DataDisks: tencentcloud.KubernetesClusterWorkerConfigDataDiskArray{
&tencentcloud.KubernetesClusterWorkerConfigDataDiskArgs{
DiskType: pulumi.String("CLOUD_PREMIUM"),
DiskSize: pulumi.Float64(50),
},
},
EnhancedSecurityService: pulumi.Bool(false),
EnhancedMonitorService: pulumi.Bool(false),
UserData: pulumi.String("dGVzdA=="),
Password: pulumi.String("ZZXXccvv1212"),
},
&tencentcloud.KubernetesClusterWorkerConfigArgs{
Count: pulumi.Float64(1),
AvailabilityZone: pulumi.String(availabilityZoneSecond),
InstanceType: pulumi.String(defaultInstanceType),
SystemDiskType: pulumi.String("CLOUD_SSD"),
SystemDiskSize: pulumi.Float64(60),
InternetChargeType: pulumi.String("TRAFFIC_POSTPAID_BY_HOUR"),
InternetMaxBandwidthOut: pulumi.Float64(100),
PublicIpAssigned: pulumi.Bool(true),
SubnetId: pulumi.String(secondSubnetId),
DataDisks: tencentcloud.KubernetesClusterWorkerConfigDataDiskArray{
&tencentcloud.KubernetesClusterWorkerConfigDataDiskArgs{
DiskType: pulumi.String("CLOUD_PREMIUM"),
DiskSize: pulumi.Float64(50),
},
},
EnhancedSecurityService: pulumi.Bool(false),
EnhancedMonitorService: pulumi.Bool(false),
UserData: pulumi.String("dGVzdA=="),
KeyIds: pulumi.StringArray{
pulumi.String("skey-11112222"),
},
CamRoleName: pulumi.String("CVM_QcsRole"),
},
},
Labels: pulumi.StringMap{
"test1": pulumi.String("test1"),
"test2": pulumi.String("test2"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var defaultInstanceType = config.Get("defaultInstanceType") ?? "SA2.2XLARGE16";
var availabilityZoneFirst = config.Get("availabilityZoneFirst") ?? "ap-guangzhou-3";
var availabilityZoneSecond = config.Get("availabilityZoneSecond") ?? "ap-guangzhou-4";
var exampleClusterCidr = config.Get("exampleClusterCidr") ?? "10.31.0.0/16";
var vpcOne = Tencentcloud.GetVpcSubnets.Invoke(new()
{
IsDefault = true,
AvailabilityZone = availabilityZoneFirst,
});
var firstVpcId = vpcOne.Apply(getVpcSubnetsResult => getVpcSubnetsResult.InstanceLists[0]?.VpcId);
var firstSubnetId = vpcOne.Apply(getVpcSubnetsResult => getVpcSubnetsResult.InstanceLists[0]?.SubnetId);
var vpcTwo = Tencentcloud.GetVpcSubnets.Invoke(new()
{
IsDefault = true,
AvailabilityZone = availabilityZoneSecond,
});
var secondVpcId = vpcTwo.Apply(getVpcSubnetsResult => getVpcSubnetsResult.InstanceLists[0]?.VpcId);
var secondSubnetId = vpcTwo.Apply(getVpcSubnetsResult => getVpcSubnetsResult.InstanceLists[0]?.SubnetId);
var sg = new Tencentcloud.SecurityGroup("sg");
var sgId = sg.SecurityGroupId;
var @default = Tencentcloud.GetImages.Invoke(new()
{
ImageTypes = new[]
{
"PUBLIC_IMAGE",
},
ImageNameRegex = "Final",
});
var imageId = @default.Apply(@default => @default.Apply(getImagesResult => getImagesResult.ImageId));
var sgRule = new Tencentcloud.SecurityGroupLiteRule("sgRule", new()
{
SecurityGroupId = sg.SecurityGroupId,
Ingresses = new[]
{
"ACCEPT#10.0.0.0/16#ALL#ALL",
"ACCEPT#172.16.0.0/22#ALL#ALL",
"DROP#0.0.0.0/0#ALL#ALL",
},
Egresses = new[]
{
"ACCEPT#172.16.0.0/22#ALL#ALL",
},
});
var example = new Tencentcloud.KubernetesCluster("example", new()
{
VpcId = firstVpcId,
ClusterCidr = exampleClusterCidr,
ClusterMaxPodNum = 32,
ClusterName = "tf_example_cluster",
ClusterDesc = "example for tke cluster",
ClusterMaxServiceNum = 32,
ClusterInternet = false,
ClusterInternetSecurityGroup = sgId,
ClusterVersion = "1.22.5",
ClusterDeployType = "MANAGED_CLUSTER",
WorkerConfigs = new[]
{
new Tencentcloud.Inputs.KubernetesClusterWorkerConfigArgs
{
Count = 1,
AvailabilityZone = availabilityZoneFirst,
InstanceType = defaultInstanceType,
SystemDiskType = "CLOUD_SSD",
SystemDiskSize = 60,
InternetChargeType = "TRAFFIC_POSTPAID_BY_HOUR",
InternetMaxBandwidthOut = 100,
PublicIpAssigned = true,
SubnetId = firstSubnetId,
DataDisks = new[]
{
new Tencentcloud.Inputs.KubernetesClusterWorkerConfigDataDiskArgs
{
DiskType = "CLOUD_PREMIUM",
DiskSize = 50,
},
},
EnhancedSecurityService = false,
EnhancedMonitorService = false,
UserData = "dGVzdA==",
Password = "ZZXXccvv1212",
},
new Tencentcloud.Inputs.KubernetesClusterWorkerConfigArgs
{
Count = 1,
AvailabilityZone = availabilityZoneSecond,
InstanceType = defaultInstanceType,
SystemDiskType = "CLOUD_SSD",
SystemDiskSize = 60,
InternetChargeType = "TRAFFIC_POSTPAID_BY_HOUR",
InternetMaxBandwidthOut = 100,
PublicIpAssigned = true,
SubnetId = secondSubnetId,
DataDisks = new[]
{
new Tencentcloud.Inputs.KubernetesClusterWorkerConfigDataDiskArgs
{
DiskType = "CLOUD_PREMIUM",
DiskSize = 50,
},
},
EnhancedSecurityService = false,
EnhancedMonitorService = false,
UserData = "dGVzdA==",
KeyIds = new[]
{
"skey-11112222",
},
CamRoleName = "CVM_QcsRole",
},
},
Labels =
{
{ "test1", "test1" },
{ "test2", "test2" },
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.TencentcloudFunctions;
import com.pulumi.tencentcloud.inputs.GetVpcSubnetsArgs;
import com.pulumi.tencentcloud.SecurityGroup;
import com.pulumi.tencentcloud.inputs.GetImagesArgs;
import com.pulumi.tencentcloud.SecurityGroupLiteRule;
import com.pulumi.tencentcloud.SecurityGroupLiteRuleArgs;
import com.pulumi.tencentcloud.KubernetesCluster;
import com.pulumi.tencentcloud.KubernetesClusterArgs;
import com.pulumi.tencentcloud.inputs.KubernetesClusterWorkerConfigArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var config = ctx.config();
final var defaultInstanceType = config.get("defaultInstanceType").orElse("SA2.2XLARGE16");
final var availabilityZoneFirst = config.get("availabilityZoneFirst").orElse("ap-guangzhou-3");
final var availabilityZoneSecond = config.get("availabilityZoneSecond").orElse("ap-guangzhou-4");
final var exampleClusterCidr = config.get("exampleClusterCidr").orElse("10.31.0.0/16");
final var vpcOne = TencentcloudFunctions.getVpcSubnets(GetVpcSubnetsArgs.builder()
.isDefault(true)
.availabilityZone(availabilityZoneFirst)
.build());
final var firstVpcId = vpcOne.applyValue(getVpcSubnetsResult -> getVpcSubnetsResult.instanceLists()[0].vpcId());
final var firstSubnetId = vpcOne.applyValue(getVpcSubnetsResult -> getVpcSubnetsResult.instanceLists()[0].subnetId());
final var vpcTwo = TencentcloudFunctions.getVpcSubnets(GetVpcSubnetsArgs.builder()
.isDefault(true)
.availabilityZone(availabilityZoneSecond)
.build());
final var secondVpcId = vpcTwo.applyValue(getVpcSubnetsResult -> getVpcSubnetsResult.instanceLists()[0].vpcId());
final var secondSubnetId = vpcTwo.applyValue(getVpcSubnetsResult -> getVpcSubnetsResult.instanceLists()[0].subnetId());
var sg = new SecurityGroup("sg");
final var sgId = sg.securityGroupId();
final var default = TencentcloudFunctions.getImages(GetImagesArgs.builder()
.imageTypes("PUBLIC_IMAGE")
.imageNameRegex("Final")
.build());
final var imageId = default_.imageId();
var sgRule = new SecurityGroupLiteRule("sgRule", SecurityGroupLiteRuleArgs.builder()
.securityGroupId(sg.securityGroupId())
.ingresses(
"ACCEPT#10.0.0.0/16#ALL#ALL",
"ACCEPT#172.16.0.0/22#ALL#ALL",
"DROP#0.0.0.0/0#ALL#ALL")
.egresses("ACCEPT#172.16.0.0/22#ALL#ALL")
.build());
var example = new KubernetesCluster("example", KubernetesClusterArgs.builder()
.vpcId(firstVpcId)
.clusterCidr(exampleClusterCidr)
.clusterMaxPodNum(32)
.clusterName("tf_example_cluster")
.clusterDesc("example for tke cluster")
.clusterMaxServiceNum(32)
.clusterInternet(false)
.clusterInternetSecurityGroup(sgId)
.clusterVersion("1.22.5")
.clusterDeployType("MANAGED_CLUSTER")
.workerConfigs(
KubernetesClusterWorkerConfigArgs.builder()
.count(1)
.availabilityZone(availabilityZoneFirst)
.instanceType(defaultInstanceType)
.systemDiskType("CLOUD_SSD")
.systemDiskSize(60)
.internetChargeType("TRAFFIC_POSTPAID_BY_HOUR")
.internetMaxBandwidthOut(100)
.publicIpAssigned(true)
.subnetId(firstSubnetId)
.dataDisks(KubernetesClusterWorkerConfigDataDiskArgs.builder()
.diskType("CLOUD_PREMIUM")
.diskSize(50)
.build())
.enhancedSecurityService(false)
.enhancedMonitorService(false)
.userData("dGVzdA==")
.password("ZZXXccvv1212")
.build(),
KubernetesClusterWorkerConfigArgs.builder()
.count(1)
.availabilityZone(availabilityZoneSecond)
.instanceType(defaultInstanceType)
.systemDiskType("CLOUD_SSD")
.systemDiskSize(60)
.internetChargeType("TRAFFIC_POSTPAID_BY_HOUR")
.internetMaxBandwidthOut(100)
.publicIpAssigned(true)
.subnetId(secondSubnetId)
.dataDisks(KubernetesClusterWorkerConfigDataDiskArgs.builder()
.diskType("CLOUD_PREMIUM")
.diskSize(50)
.build())
.enhancedSecurityService(false)
.enhancedMonitorService(false)
.userData("dGVzdA==")
.keyIds("skey-11112222")
.camRoleName("CVM_QcsRole")
.build())
.labels(Map.ofEntries(
Map.entry("test1", "test1"),
Map.entry("test2", "test2")
))
.build());
}
}
configuration:
defaultInstanceType:
type: string
default: SA2.2XLARGE16
availabilityZoneFirst:
type: string
default: ap-guangzhou-3
availabilityZoneSecond:
type: string
default: ap-guangzhou-4
exampleClusterCidr:
type: string
default: 10.31.0.0/16
resources:
sg:
type: tencentcloud:SecurityGroup
sgRule:
type: tencentcloud:SecurityGroupLiteRule
properties:
securityGroupId: ${sg.securityGroupId}
ingresses:
- ACCEPT#10.0.0.0/16#ALL#ALL
- ACCEPT#172.16.0.0/22#ALL#ALL
- DROP#0.0.0.0/0#ALL#ALL
egresses:
- ACCEPT#172.16.0.0/22#ALL#ALL
example:
type: tencentcloud:KubernetesCluster
properties:
vpcId: ${firstVpcId}
clusterCidr: ${exampleClusterCidr}
clusterMaxPodNum: 32
clusterName: tf_example_cluster
clusterDesc: example for tke cluster
clusterMaxServiceNum: 32
clusterInternet: false
clusterInternetSecurityGroup: ${sgId}
clusterVersion: 1.22.5
clusterDeployType: MANAGED_CLUSTER
workerConfigs:
- count: 1
availabilityZone: ${availabilityZoneFirst}
instanceType: ${defaultInstanceType}
systemDiskType: CLOUD_SSD
systemDiskSize: 60
internetChargeType: TRAFFIC_POSTPAID_BY_HOUR
internetMaxBandwidthOut: 100
publicIpAssigned: true
subnetId: ${firstSubnetId}
dataDisks:
- diskType: CLOUD_PREMIUM
diskSize: 50
enhancedSecurityService: false
enhancedMonitorService: false
userData: dGVzdA==
password: ZZXXccvv1212
- count: 1
availabilityZone: ${availabilityZoneSecond}
instanceType: ${defaultInstanceType}
systemDiskType: CLOUD_SSD
systemDiskSize: 60
internetChargeType: TRAFFIC_POSTPAID_BY_HOUR
internetMaxBandwidthOut: 100
publicIpAssigned: true
subnetId: ${secondSubnetId}
dataDisks:
- diskType: CLOUD_PREMIUM
diskSize: 50
enhancedSecurityService: false
enhancedMonitorService: false
userData: dGVzdA==
keyIds:
- skey-11112222
camRoleName: CVM_QcsRole
labels:
test1: test1
test2: test2
variables:
firstVpcId: ${vpcOne.instanceLists[0].vpcId}
firstSubnetId: ${vpcOne.instanceLists[0].subnetId}
secondVpcId: ${vpcTwo.instanceLists[0].vpcId}
secondSubnetId: ${vpcTwo.instanceLists[0].subnetId}
sgId: ${sg.securityGroupId}
imageId: ${default.imageId}
vpcOne:
fn::invoke:
function: tencentcloud:getVpcSubnets
arguments:
isDefault: true
availabilityZone: ${availabilityZoneFirst}
vpcTwo:
fn::invoke:
function: tencentcloud:getVpcSubnets
arguments:
isDefault: true
availabilityZone: ${availabilityZoneSecond}
default:
fn::invoke:
function: tencentcloud:getImages
arguments:
imageTypes:
- PUBLIC_IMAGE
imageNameRegex: Final
Create an empty cluster with a node pool
The cluster does not have any nodes, nodes will be added through node pool.
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const config = new pulumi.Config();
const defaultInstanceType = config.get("defaultInstanceType") || "SA2.2XLARGE16";
const availabilityZoneFirst = config.get("availabilityZoneFirst") || "ap-guangzhou-3";
const availabilityZoneSecond = config.get("availabilityZoneSecond") || "ap-guangzhou-4";
const exampleClusterCidr = config.get("exampleClusterCidr") || "10.31.0.0/16";
const vpcOne = tencentcloud.getVpcSubnets({
isDefault: true,
availabilityZone: availabilityZoneFirst,
});
const firstVpcId = vpcOne.then(vpcOne => vpcOne.instanceLists?.[0]?.vpcId);
const firstSubnetId = vpcOne.then(vpcOne => vpcOne.instanceLists?.[0]?.subnetId);
const sg = new tencentcloud.SecurityGroup("sg", {});
const sgId = sg.securityGroupId;
const vpcTwo = tencentcloud.getVpcSubnets({
isDefault: true,
availabilityZone: availabilityZoneSecond,
});
const sgRule = new tencentcloud.SecurityGroupLiteRule("sgRule", {
securityGroupId: sg.securityGroupId,
ingresses: [
"ACCEPT#10.0.0.0/16#ALL#ALL",
"ACCEPT#172.16.0.0/22#ALL#ALL",
"DROP#0.0.0.0/0#ALL#ALL",
],
egresses: ["ACCEPT#172.16.0.0/22#ALL#ALL"],
});
const exampleKubernetesCluster = new tencentcloud.KubernetesCluster("exampleKubernetesCluster", {
vpcId: firstVpcId,
clusterCidr: exampleClusterCidr,
clusterMaxPodNum: 32,
clusterName: "tf_example_cluster_np",
clusterDesc: "example for tke cluster",
clusterMaxServiceNum: 32,
clusterVersion: "1.22.5",
clusterDeployType: "MANAGED_CLUSTER",
});
// without any worker config
const exampleKubernetesNodePool = new tencentcloud.KubernetesNodePool("exampleKubernetesNodePool", {
clusterId: exampleKubernetesCluster.kubernetesClusterId,
maxSize: 6,
minSize: 1,
vpcId: firstVpcId,
subnetIds: [firstSubnetId],
retryPolicy: "INCREMENTAL_INTERVALS",
desiredCapacity: 4,
enableAutoScale: true,
multiZoneSubnetPolicy: "EQUALITY",
autoScalingConfig: {
instanceType: defaultInstanceType,
systemDiskType: "CLOUD_PREMIUM",
systemDiskSize: 50,
orderlySecurityGroupIds: [sgId],
dataDisks: [{
diskType: "CLOUD_PREMIUM",
diskSize: 50,
}],
internetChargeType: "TRAFFIC_POSTPAID_BY_HOUR",
internetMaxBandwidthOut: 10,
publicIpAssigned: true,
password: "test123#",
enhancedSecurityService: false,
enhancedMonitorService: false,
hostName: "12.123.0.0",
hostNameStyle: "ORIGINAL",
},
labels: {
test1: "test1",
test2: "test2",
},
taints: [
{
key: "test_taint",
value: "taint_value",
effect: "PreferNoSchedule",
},
{
key: "test_taint2",
value: "taint_value2",
effect: "PreferNoSchedule",
},
],
nodeConfig: {
extraArgs: ["root-dir=/var/lib/kubelet"],
},
});
import pulumi
import pulumi_tencentcloud as tencentcloud
config = pulumi.Config()
default_instance_type = config.get("defaultInstanceType")
if default_instance_type is None:
default_instance_type = "SA2.2XLARGE16"
availability_zone_first = config.get("availabilityZoneFirst")
if availability_zone_first is None:
availability_zone_first = "ap-guangzhou-3"
availability_zone_second = config.get("availabilityZoneSecond")
if availability_zone_second is None:
availability_zone_second = "ap-guangzhou-4"
example_cluster_cidr = config.get("exampleClusterCidr")
if example_cluster_cidr is None:
example_cluster_cidr = "10.31.0.0/16"
vpc_one = tencentcloud.get_vpc_subnets(is_default=True,
availability_zone=availability_zone_first)
first_vpc_id = vpc_one.instance_lists[0].vpc_id
first_subnet_id = vpc_one.instance_lists[0].subnet_id
sg = tencentcloud.SecurityGroup("sg")
sg_id = sg.security_group_id
vpc_two = tencentcloud.get_vpc_subnets(is_default=True,
availability_zone=availability_zone_second)
sg_rule = tencentcloud.SecurityGroupLiteRule("sgRule",
security_group_id=sg.security_group_id,
ingresses=[
"ACCEPT#10.0.0.0/16#ALL#ALL",
"ACCEPT#172.16.0.0/22#ALL#ALL",
"DROP#0.0.0.0/0#ALL#ALL",
],
egresses=["ACCEPT#172.16.0.0/22#ALL#ALL"])
example_kubernetes_cluster = tencentcloud.KubernetesCluster("exampleKubernetesCluster",
vpc_id=first_vpc_id,
cluster_cidr=example_cluster_cidr,
cluster_max_pod_num=32,
cluster_name="tf_example_cluster_np",
cluster_desc="example for tke cluster",
cluster_max_service_num=32,
cluster_version="1.22.5",
cluster_deploy_type="MANAGED_CLUSTER")
# without any worker config
example_kubernetes_node_pool = tencentcloud.KubernetesNodePool("exampleKubernetesNodePool",
cluster_id=example_kubernetes_cluster.kubernetes_cluster_id,
max_size=6,
min_size=1,
vpc_id=first_vpc_id,
subnet_ids=[first_subnet_id],
retry_policy="INCREMENTAL_INTERVALS",
desired_capacity=4,
enable_auto_scale=True,
multi_zone_subnet_policy="EQUALITY",
auto_scaling_config={
"instance_type": default_instance_type,
"system_disk_type": "CLOUD_PREMIUM",
"system_disk_size": 50,
"orderly_security_group_ids": [sg_id],
"data_disks": [{
"disk_type": "CLOUD_PREMIUM",
"disk_size": 50,
}],
"internet_charge_type": "TRAFFIC_POSTPAID_BY_HOUR",
"internet_max_bandwidth_out": 10,
"public_ip_assigned": True,
"password": "test123#",
"enhanced_security_service": False,
"enhanced_monitor_service": False,
"host_name": "12.123.0.0",
"host_name_style": "ORIGINAL",
},
labels={
"test1": "test1",
"test2": "test2",
},
taints=[
{
"key": "test_taint",
"value": "taint_value",
"effect": "PreferNoSchedule",
},
{
"key": "test_taint2",
"value": "taint_value2",
"effect": "PreferNoSchedule",
},
],
node_config={
"extra_args": ["root-dir=/var/lib/kubelet"],
})
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
defaultInstanceType := "SA2.2XLARGE16"
if param := cfg.Get("defaultInstanceType"); param != "" {
defaultInstanceType = param
}
availabilityZoneFirst := "ap-guangzhou-3"
if param := cfg.Get("availabilityZoneFirst"); param != "" {
availabilityZoneFirst = param
}
availabilityZoneSecond := "ap-guangzhou-4"
if param := cfg.Get("availabilityZoneSecond"); param != "" {
availabilityZoneSecond = param
}
exampleClusterCidr := "10.31.0.0/16"
if param := cfg.Get("exampleClusterCidr"); param != "" {
exampleClusterCidr = param
}
vpcOne, err := tencentcloud.GetVpcSubnets(ctx, &tencentcloud.GetVpcSubnetsArgs{
IsDefault: pulumi.BoolRef(true),
AvailabilityZone: pulumi.StringRef(availabilityZoneFirst),
}, nil)
if err != nil {
return err
}
firstVpcId := vpcOne.InstanceLists[0].VpcId
firstSubnetId := vpcOne.InstanceLists[0].SubnetId
sg, err := tencentcloud.NewSecurityGroup(ctx, "sg", nil)
if err != nil {
return err
}
sgId := sg.SecurityGroupId
_, err = tencentcloud.GetVpcSubnets(ctx, &tencentcloud.GetVpcSubnetsArgs{
IsDefault: pulumi.BoolRef(true),
AvailabilityZone: pulumi.StringRef(availabilityZoneSecond),
}, nil)
if err != nil {
return err
}
_, err = tencentcloud.NewSecurityGroupLiteRule(ctx, "sgRule", &tencentcloud.SecurityGroupLiteRuleArgs{
SecurityGroupId: sg.SecurityGroupId,
Ingresses: pulumi.StringArray{
pulumi.String("ACCEPT#10.0.0.0/16#ALL#ALL"),
pulumi.String("ACCEPT#172.16.0.0/22#ALL#ALL"),
pulumi.String("DROP#0.0.0.0/0#ALL#ALL"),
},
Egresses: pulumi.StringArray{
pulumi.String("ACCEPT#172.16.0.0/22#ALL#ALL"),
},
})
if err != nil {
return err
}
exampleKubernetesCluster, err := tencentcloud.NewKubernetesCluster(ctx, "exampleKubernetesCluster", &tencentcloud.KubernetesClusterArgs{
VpcId: pulumi.String(firstVpcId),
ClusterCidr: pulumi.String(exampleClusterCidr),
ClusterMaxPodNum: pulumi.Float64(32),
ClusterName: pulumi.String("tf_example_cluster_np"),
ClusterDesc: pulumi.String("example for tke cluster"),
ClusterMaxServiceNum: pulumi.Float64(32),
ClusterVersion: pulumi.String("1.22.5"),
ClusterDeployType: pulumi.String("MANAGED_CLUSTER"),
})
if err != nil {
return err
}
_, err = tencentcloud.NewKubernetesNodePool(ctx, "exampleKubernetesNodePool", &tencentcloud.KubernetesNodePoolArgs{
ClusterId: exampleKubernetesCluster.KubernetesClusterId,
MaxSize: pulumi.Float64(6),
MinSize: pulumi.Float64(1),
VpcId: pulumi.String(firstVpcId),
SubnetIds: pulumi.StringArray{
pulumi.String(firstSubnetId),
},
RetryPolicy: pulumi.String("INCREMENTAL_INTERVALS"),
DesiredCapacity: pulumi.Float64(4),
EnableAutoScale: pulumi.Bool(true),
MultiZoneSubnetPolicy: pulumi.String("EQUALITY"),
AutoScalingConfig: &tencentcloud.KubernetesNodePoolAutoScalingConfigArgs{
InstanceType: pulumi.String(defaultInstanceType),
SystemDiskType: pulumi.String("CLOUD_PREMIUM"),
SystemDiskSize: pulumi.Float64(50),
OrderlySecurityGroupIds: pulumi.StringArray{
pulumi.String(sgId),
},
DataDisks: tencentcloud.KubernetesNodePoolAutoScalingConfigDataDiskArray{
&tencentcloud.KubernetesNodePoolAutoScalingConfigDataDiskArgs{
DiskType: pulumi.String("CLOUD_PREMIUM"),
DiskSize: pulumi.Float64(50),
},
},
InternetChargeType: pulumi.String("TRAFFIC_POSTPAID_BY_HOUR"),
InternetMaxBandwidthOut: pulumi.Float64(10),
PublicIpAssigned: pulumi.Bool(true),
Password: pulumi.String("test123#"),
EnhancedSecurityService: pulumi.Bool(false),
EnhancedMonitorService: pulumi.Bool(false),
HostName: pulumi.String("12.123.0.0"),
HostNameStyle: pulumi.String("ORIGINAL"),
},
Labels: pulumi.StringMap{
"test1": pulumi.String("test1"),
"test2": pulumi.String("test2"),
},
Taints: tencentcloud.KubernetesNodePoolTaintArray{
&tencentcloud.KubernetesNodePoolTaintArgs{
Key: pulumi.String("test_taint"),
Value: pulumi.String("taint_value"),
Effect: pulumi.String("PreferNoSchedule"),
},
&tencentcloud.KubernetesNodePoolTaintArgs{
Key: pulumi.String("test_taint2"),
Value: pulumi.String("taint_value2"),
Effect: pulumi.String("PreferNoSchedule"),
},
},
NodeConfig: &tencentcloud.KubernetesNodePoolNodeConfigArgs{
ExtraArgs: pulumi.StringArray{
pulumi.String("root-dir=/var/lib/kubelet"),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var defaultInstanceType = config.Get("defaultInstanceType") ?? "SA2.2XLARGE16";
var availabilityZoneFirst = config.Get("availabilityZoneFirst") ?? "ap-guangzhou-3";
var availabilityZoneSecond = config.Get("availabilityZoneSecond") ?? "ap-guangzhou-4";
var exampleClusterCidr = config.Get("exampleClusterCidr") ?? "10.31.0.0/16";
var vpcOne = Tencentcloud.GetVpcSubnets.Invoke(new()
{
IsDefault = true,
AvailabilityZone = availabilityZoneFirst,
});
var firstVpcId = vpcOne.Apply(getVpcSubnetsResult => getVpcSubnetsResult.InstanceLists[0]?.VpcId);
var firstSubnetId = vpcOne.Apply(getVpcSubnetsResult => getVpcSubnetsResult.InstanceLists[0]?.SubnetId);
var sg = new Tencentcloud.SecurityGroup("sg");
var sgId = sg.SecurityGroupId;
var vpcTwo = Tencentcloud.GetVpcSubnets.Invoke(new()
{
IsDefault = true,
AvailabilityZone = availabilityZoneSecond,
});
var sgRule = new Tencentcloud.SecurityGroupLiteRule("sgRule", new()
{
SecurityGroupId = sg.SecurityGroupId,
Ingresses = new[]
{
"ACCEPT#10.0.0.0/16#ALL#ALL",
"ACCEPT#172.16.0.0/22#ALL#ALL",
"DROP#0.0.0.0/0#ALL#ALL",
},
Egresses = new[]
{
"ACCEPT#172.16.0.0/22#ALL#ALL",
},
});
var exampleKubernetesCluster = new Tencentcloud.KubernetesCluster("exampleKubernetesCluster", new()
{
VpcId = firstVpcId,
ClusterCidr = exampleClusterCidr,
ClusterMaxPodNum = 32,
ClusterName = "tf_example_cluster_np",
ClusterDesc = "example for tke cluster",
ClusterMaxServiceNum = 32,
ClusterVersion = "1.22.5",
ClusterDeployType = "MANAGED_CLUSTER",
});
// without any worker config
var exampleKubernetesNodePool = new Tencentcloud.KubernetesNodePool("exampleKubernetesNodePool", new()
{
ClusterId = exampleKubernetesCluster.KubernetesClusterId,
MaxSize = 6,
MinSize = 1,
VpcId = firstVpcId,
SubnetIds = new[]
{
firstSubnetId,
},
RetryPolicy = "INCREMENTAL_INTERVALS",
DesiredCapacity = 4,
EnableAutoScale = true,
MultiZoneSubnetPolicy = "EQUALITY",
AutoScalingConfig = new Tencentcloud.Inputs.KubernetesNodePoolAutoScalingConfigArgs
{
InstanceType = defaultInstanceType,
SystemDiskType = "CLOUD_PREMIUM",
SystemDiskSize = 50,
OrderlySecurityGroupIds = new[]
{
sgId,
},
DataDisks = new[]
{
new Tencentcloud.Inputs.KubernetesNodePoolAutoScalingConfigDataDiskArgs
{
DiskType = "CLOUD_PREMIUM",
DiskSize = 50,
},
},
InternetChargeType = "TRAFFIC_POSTPAID_BY_HOUR",
InternetMaxBandwidthOut = 10,
PublicIpAssigned = true,
Password = "test123#",
EnhancedSecurityService = false,
EnhancedMonitorService = false,
HostName = "12.123.0.0",
HostNameStyle = "ORIGINAL",
},
Labels =
{
{ "test1", "test1" },
{ "test2", "test2" },
},
Taints = new[]
{
new Tencentcloud.Inputs.KubernetesNodePoolTaintArgs
{
Key = "test_taint",
Value = "taint_value",
Effect = "PreferNoSchedule",
},
new Tencentcloud.Inputs.KubernetesNodePoolTaintArgs
{
Key = "test_taint2",
Value = "taint_value2",
Effect = "PreferNoSchedule",
},
},
NodeConfig = new Tencentcloud.Inputs.KubernetesNodePoolNodeConfigArgs
{
ExtraArgs = new[]
{
"root-dir=/var/lib/kubelet",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.TencentcloudFunctions;
import com.pulumi.tencentcloud.inputs.GetVpcSubnetsArgs;
import com.pulumi.tencentcloud.SecurityGroup;
import com.pulumi.tencentcloud.SecurityGroupLiteRule;
import com.pulumi.tencentcloud.SecurityGroupLiteRuleArgs;
import com.pulumi.tencentcloud.KubernetesCluster;
import com.pulumi.tencentcloud.KubernetesClusterArgs;
import com.pulumi.tencentcloud.KubernetesNodePool;
import com.pulumi.tencentcloud.KubernetesNodePoolArgs;
import com.pulumi.tencentcloud.inputs.KubernetesNodePoolAutoScalingConfigArgs;
import com.pulumi.tencentcloud.inputs.KubernetesNodePoolTaintArgs;
import com.pulumi.tencentcloud.inputs.KubernetesNodePoolNodeConfigArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var config = ctx.config();
final var defaultInstanceType = config.get("defaultInstanceType").orElse("SA2.2XLARGE16");
final var availabilityZoneFirst = config.get("availabilityZoneFirst").orElse("ap-guangzhou-3");
final var availabilityZoneSecond = config.get("availabilityZoneSecond").orElse("ap-guangzhou-4");
final var exampleClusterCidr = config.get("exampleClusterCidr").orElse("10.31.0.0/16");
final var vpcOne = TencentcloudFunctions.getVpcSubnets(GetVpcSubnetsArgs.builder()
.isDefault(true)
.availabilityZone(availabilityZoneFirst)
.build());
final var firstVpcId = vpcOne.applyValue(getVpcSubnetsResult -> getVpcSubnetsResult.instanceLists()[0].vpcId());
final var firstSubnetId = vpcOne.applyValue(getVpcSubnetsResult -> getVpcSubnetsResult.instanceLists()[0].subnetId());
var sg = new SecurityGroup("sg");
final var sgId = sg.securityGroupId();
final var vpcTwo = TencentcloudFunctions.getVpcSubnets(GetVpcSubnetsArgs.builder()
.isDefault(true)
.availabilityZone(availabilityZoneSecond)
.build());
var sgRule = new SecurityGroupLiteRule("sgRule", SecurityGroupLiteRuleArgs.builder()
.securityGroupId(sg.securityGroupId())
.ingresses(
"ACCEPT#10.0.0.0/16#ALL#ALL",
"ACCEPT#172.16.0.0/22#ALL#ALL",
"DROP#0.0.0.0/0#ALL#ALL")
.egresses("ACCEPT#172.16.0.0/22#ALL#ALL")
.build());
var exampleKubernetesCluster = new KubernetesCluster("exampleKubernetesCluster", KubernetesClusterArgs.builder()
.vpcId(firstVpcId)
.clusterCidr(exampleClusterCidr)
.clusterMaxPodNum(32)
.clusterName("tf_example_cluster_np")
.clusterDesc("example for tke cluster")
.clusterMaxServiceNum(32)
.clusterVersion("1.22.5")
.clusterDeployType("MANAGED_CLUSTER")
.build());
// without any worker config
var exampleKubernetesNodePool = new KubernetesNodePool("exampleKubernetesNodePool", KubernetesNodePoolArgs.builder()
.clusterId(exampleKubernetesCluster.kubernetesClusterId())
.maxSize(6)
.minSize(1)
.vpcId(firstVpcId)
.subnetIds(firstSubnetId)
.retryPolicy("INCREMENTAL_INTERVALS")
.desiredCapacity(4)
.enableAutoScale(true)
.multiZoneSubnetPolicy("EQUALITY")
.autoScalingConfig(KubernetesNodePoolAutoScalingConfigArgs.builder()
.instanceType(defaultInstanceType)
.systemDiskType("CLOUD_PREMIUM")
.systemDiskSize("50")
.orderlySecurityGroupIds(sgId)
.dataDisks(KubernetesNodePoolAutoScalingConfigDataDiskArgs.builder()
.diskType("CLOUD_PREMIUM")
.diskSize(50)
.build())
.internetChargeType("TRAFFIC_POSTPAID_BY_HOUR")
.internetMaxBandwidthOut(10)
.publicIpAssigned(true)
.password("test123#")
.enhancedSecurityService(false)
.enhancedMonitorService(false)
.hostName("12.123.0.0")
.hostNameStyle("ORIGINAL")
.build())
.labels(Map.ofEntries(
Map.entry("test1", "test1"),
Map.entry("test2", "test2")
))
.taints(
KubernetesNodePoolTaintArgs.builder()
.key("test_taint")
.value("taint_value")
.effect("PreferNoSchedule")
.build(),
KubernetesNodePoolTaintArgs.builder()
.key("test_taint2")
.value("taint_value2")
.effect("PreferNoSchedule")
.build())
.nodeConfig(KubernetesNodePoolNodeConfigArgs.builder()
.extraArgs("root-dir=/var/lib/kubelet")
.build())
.build());
}
}
configuration:
defaultInstanceType:
type: string
default: SA2.2XLARGE16
availabilityZoneFirst:
type: string
default: ap-guangzhou-3
availabilityZoneSecond:
type: string
default: ap-guangzhou-4
exampleClusterCidr:
type: string
default: 10.31.0.0/16
resources:
sg:
type: tencentcloud:SecurityGroup
sgRule:
type: tencentcloud:SecurityGroupLiteRule
properties:
securityGroupId: ${sg.securityGroupId}
ingresses:
- ACCEPT#10.0.0.0/16#ALL#ALL
- ACCEPT#172.16.0.0/22#ALL#ALL
- DROP#0.0.0.0/0#ALL#ALL
egresses:
- ACCEPT#172.16.0.0/22#ALL#ALL
exampleKubernetesCluster:
type: tencentcloud:KubernetesCluster
properties:
vpcId: ${firstVpcId}
clusterCidr: ${exampleClusterCidr}
clusterMaxPodNum: 32
clusterName: tf_example_cluster_np
clusterDesc: example for tke cluster
clusterMaxServiceNum: 32
clusterVersion: 1.22.5
clusterDeployType: MANAGED_CLUSTER
exampleKubernetesNodePool:
type: tencentcloud:KubernetesNodePool
properties:
clusterId: ${exampleKubernetesCluster.kubernetesClusterId}
maxSize: 6
# set the node scaling range [1,6]
minSize: 1
vpcId: ${firstVpcId}
subnetIds:
- ${firstSubnetId}
retryPolicy: INCREMENTAL_INTERVALS
desiredCapacity: 4
enableAutoScale: true
multiZoneSubnetPolicy: EQUALITY
autoScalingConfig:
instanceType: ${defaultInstanceType}
systemDiskType: CLOUD_PREMIUM
systemDiskSize: '50'
orderlySecurityGroupIds:
- ${sgId}
dataDisks:
- diskType: CLOUD_PREMIUM
diskSize: 50
internetChargeType: TRAFFIC_POSTPAID_BY_HOUR
internetMaxBandwidthOut: 10
publicIpAssigned: true
password: test123#
enhancedSecurityService: false
enhancedMonitorService: false
hostName: 12.123.0.0
hostNameStyle: ORIGINAL
labels:
test1: test1
test2: test2
taints:
- key: test_taint
value: taint_value
effect: PreferNoSchedule
- key: test_taint2
value: taint_value2
effect: PreferNoSchedule
nodeConfig:
extraArgs:
- root-dir=/var/lib/kubelet
variables:
firstVpcId: ${vpcOne.instanceLists[0].vpcId}
firstSubnetId: ${vpcOne.instanceLists[0].subnetId}
sgId: ${sg.securityGroupId}
vpcOne:
fn::invoke:
function: tencentcloud:getVpcSubnets
arguments:
isDefault: true
availabilityZone: ${availabilityZoneFirst}
vpcTwo:
fn::invoke:
function: tencentcloud:getVpcSubnets
arguments:
isDefault: true
availabilityZone: ${availabilityZoneSecond}
Create a cluster with a node pool and open the network access with cluster endpoint
The cluster’s internet and intranet access will be opened after nodes are added through node pool.
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const config = new pulumi.Config();
const defaultInstanceType = config.get("defaultInstanceType") || "SA2.2XLARGE16";
const availabilityZoneFirst = config.get("availabilityZoneFirst") || "ap-guangzhou-3";
const availabilityZoneSecond = config.get("availabilityZoneSecond") || "ap-guangzhou-4";
const exampleClusterCidr = config.get("exampleClusterCidr") || "10.31.0.0/16";
const vpcOne = tencentcloud.getVpcSubnets({
isDefault: true,
availabilityZone: availabilityZoneFirst,
});
const firstVpcId = vpcOne.then(vpcOne => vpcOne.instanceLists?.[0]?.vpcId);
const firstSubnetId = vpcOne.then(vpcOne => vpcOne.instanceLists?.[0]?.subnetId);
const sg = new tencentcloud.SecurityGroup("sg", {});
const sgId = sg.securityGroupId;
const vpcTwo = tencentcloud.getVpcSubnets({
isDefault: true,
availabilityZone: availabilityZoneSecond,
});
const sgRule = new tencentcloud.SecurityGroupLiteRule("sgRule", {
securityGroupId: sg.securityGroupId,
ingresses: [
"ACCEPT#10.0.0.0/16#ALL#ALL",
"ACCEPT#172.16.0.0/22#ALL#ALL",
"DROP#0.0.0.0/0#ALL#ALL",
],
egresses: ["ACCEPT#172.16.0.0/22#ALL#ALL"],
});
const exampleKubernetesCluster = new tencentcloud.KubernetesCluster("exampleKubernetesCluster", {
vpcId: firstVpcId,
clusterCidr: exampleClusterCidr,
clusterMaxPodNum: 32,
clusterName: "tf_example_cluster",
clusterDesc: "example for tke cluster",
clusterMaxServiceNum: 32,
clusterInternet: false,
clusterVersion: "1.22.5",
clusterDeployType: "MANAGED_CLUSTER",
});
// without any worker config
const exampleKubernetesNodePool = new tencentcloud.KubernetesNodePool("exampleKubernetesNodePool", {
clusterId: exampleKubernetesCluster.kubernetesClusterId,
maxSize: 6,
minSize: 1,
vpcId: firstVpcId,
subnetIds: [firstSubnetId],
retryPolicy: "INCREMENTAL_INTERVALS",
desiredCapacity: 4,
enableAutoScale: true,
multiZoneSubnetPolicy: "EQUALITY",
autoScalingConfig: {
instanceType: defaultInstanceType,
systemDiskType: "CLOUD_PREMIUM",
systemDiskSize: 50,
orderlySecurityGroupIds: [sgId],
dataDisks: [{
diskType: "CLOUD_PREMIUM",
diskSize: 50,
}],
internetChargeType: "TRAFFIC_POSTPAID_BY_HOUR",
internetMaxBandwidthOut: 10,
publicIpAssigned: true,
password: "test123#",
enhancedSecurityService: false,
enhancedMonitorService: false,
hostName: "12.123.0.0",
hostNameStyle: "ORIGINAL",
},
labels: {
test1: "test1",
test2: "test2",
},
taints: [
{
key: "test_taint",
value: "taint_value",
effect: "PreferNoSchedule",
},
{
key: "test_taint2",
value: "taint_value2",
effect: "PreferNoSchedule",
},
],
nodeConfig: {
extraArgs: ["root-dir=/var/lib/kubelet"],
},
});
const exampleKubernetesClusterEndpoint = new tencentcloud.KubernetesClusterEndpoint("exampleKubernetesClusterEndpoint", {
clusterId: exampleKubernetesCluster.kubernetesClusterId,
clusterInternet: true,
clusterIntranet: true,
clusterInternetSecurityGroup: sgId,
clusterIntranetSubnetId: firstSubnetId,
}, {
dependsOn: [exampleKubernetesNodePool],
});
import pulumi
import pulumi_tencentcloud as tencentcloud
config = pulumi.Config()
default_instance_type = config.get("defaultInstanceType")
if default_instance_type is None:
default_instance_type = "SA2.2XLARGE16"
availability_zone_first = config.get("availabilityZoneFirst")
if availability_zone_first is None:
availability_zone_first = "ap-guangzhou-3"
availability_zone_second = config.get("availabilityZoneSecond")
if availability_zone_second is None:
availability_zone_second = "ap-guangzhou-4"
example_cluster_cidr = config.get("exampleClusterCidr")
if example_cluster_cidr is None:
example_cluster_cidr = "10.31.0.0/16"
vpc_one = tencentcloud.get_vpc_subnets(is_default=True,
availability_zone=availability_zone_first)
first_vpc_id = vpc_one.instance_lists[0].vpc_id
first_subnet_id = vpc_one.instance_lists[0].subnet_id
sg = tencentcloud.SecurityGroup("sg")
sg_id = sg.security_group_id
vpc_two = tencentcloud.get_vpc_subnets(is_default=True,
availability_zone=availability_zone_second)
sg_rule = tencentcloud.SecurityGroupLiteRule("sgRule",
security_group_id=sg.security_group_id,
ingresses=[
"ACCEPT#10.0.0.0/16#ALL#ALL",
"ACCEPT#172.16.0.0/22#ALL#ALL",
"DROP#0.0.0.0/0#ALL#ALL",
],
egresses=["ACCEPT#172.16.0.0/22#ALL#ALL"])
example_kubernetes_cluster = tencentcloud.KubernetesCluster("exampleKubernetesCluster",
vpc_id=first_vpc_id,
cluster_cidr=example_cluster_cidr,
cluster_max_pod_num=32,
cluster_name="tf_example_cluster",
cluster_desc="example for tke cluster",
cluster_max_service_num=32,
cluster_internet=False,
cluster_version="1.22.5",
cluster_deploy_type="MANAGED_CLUSTER")
# without any worker config
example_kubernetes_node_pool = tencentcloud.KubernetesNodePool("exampleKubernetesNodePool",
cluster_id=example_kubernetes_cluster.kubernetes_cluster_id,
max_size=6,
min_size=1,
vpc_id=first_vpc_id,
subnet_ids=[first_subnet_id],
retry_policy="INCREMENTAL_INTERVALS",
desired_capacity=4,
enable_auto_scale=True,
multi_zone_subnet_policy="EQUALITY",
auto_scaling_config={
"instance_type": default_instance_type,
"system_disk_type": "CLOUD_PREMIUM",
"system_disk_size": 50,
"orderly_security_group_ids": [sg_id],
"data_disks": [{
"disk_type": "CLOUD_PREMIUM",
"disk_size": 50,
}],
"internet_charge_type": "TRAFFIC_POSTPAID_BY_HOUR",
"internet_max_bandwidth_out": 10,
"public_ip_assigned": True,
"password": "test123#",
"enhanced_security_service": False,
"enhanced_monitor_service": False,
"host_name": "12.123.0.0",
"host_name_style": "ORIGINAL",
},
labels={
"test1": "test1",
"test2": "test2",
},
taints=[
{
"key": "test_taint",
"value": "taint_value",
"effect": "PreferNoSchedule",
},
{
"key": "test_taint2",
"value": "taint_value2",
"effect": "PreferNoSchedule",
},
],
node_config={
"extra_args": ["root-dir=/var/lib/kubelet"],
})
example_kubernetes_cluster_endpoint = tencentcloud.KubernetesClusterEndpoint("exampleKubernetesClusterEndpoint",
cluster_id=example_kubernetes_cluster.kubernetes_cluster_id,
cluster_internet=True,
cluster_intranet=True,
cluster_internet_security_group=sg_id,
cluster_intranet_subnet_id=first_subnet_id,
opts = pulumi.ResourceOptions(depends_on=[example_kubernetes_node_pool]))
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
defaultInstanceType := "SA2.2XLARGE16"
if param := cfg.Get("defaultInstanceType"); param != "" {
defaultInstanceType = param
}
availabilityZoneFirst := "ap-guangzhou-3"
if param := cfg.Get("availabilityZoneFirst"); param != "" {
availabilityZoneFirst = param
}
availabilityZoneSecond := "ap-guangzhou-4"
if param := cfg.Get("availabilityZoneSecond"); param != "" {
availabilityZoneSecond = param
}
exampleClusterCidr := "10.31.0.0/16"
if param := cfg.Get("exampleClusterCidr"); param != "" {
exampleClusterCidr = param
}
vpcOne, err := tencentcloud.GetVpcSubnets(ctx, &tencentcloud.GetVpcSubnetsArgs{
IsDefault: pulumi.BoolRef(true),
AvailabilityZone: pulumi.StringRef(availabilityZoneFirst),
}, nil)
if err != nil {
return err
}
firstVpcId := vpcOne.InstanceLists[0].VpcId
firstSubnetId := vpcOne.InstanceLists[0].SubnetId
sg, err := tencentcloud.NewSecurityGroup(ctx, "sg", nil)
if err != nil {
return err
}
sgId := sg.SecurityGroupId
_, err = tencentcloud.GetVpcSubnets(ctx, &tencentcloud.GetVpcSubnetsArgs{
IsDefault: pulumi.BoolRef(true),
AvailabilityZone: pulumi.StringRef(availabilityZoneSecond),
}, nil)
if err != nil {
return err
}
_, err = tencentcloud.NewSecurityGroupLiteRule(ctx, "sgRule", &tencentcloud.SecurityGroupLiteRuleArgs{
SecurityGroupId: sg.SecurityGroupId,
Ingresses: pulumi.StringArray{
pulumi.String("ACCEPT#10.0.0.0/16#ALL#ALL"),
pulumi.String("ACCEPT#172.16.0.0/22#ALL#ALL"),
pulumi.String("DROP#0.0.0.0/0#ALL#ALL"),
},
Egresses: pulumi.StringArray{
pulumi.String("ACCEPT#172.16.0.0/22#ALL#ALL"),
},
})
if err != nil {
return err
}
exampleKubernetesCluster, err := tencentcloud.NewKubernetesCluster(ctx, "exampleKubernetesCluster", &tencentcloud.KubernetesClusterArgs{
VpcId: pulumi.String(firstVpcId),
ClusterCidr: pulumi.String(exampleClusterCidr),
ClusterMaxPodNum: pulumi.Float64(32),
ClusterName: pulumi.String("tf_example_cluster"),
ClusterDesc: pulumi.String("example for tke cluster"),
ClusterMaxServiceNum: pulumi.Float64(32),
ClusterInternet: pulumi.Bool(false),
ClusterVersion: pulumi.String("1.22.5"),
ClusterDeployType: pulumi.String("MANAGED_CLUSTER"),
})
if err != nil {
return err
}
exampleKubernetesNodePool, err := tencentcloud.NewKubernetesNodePool(ctx, "exampleKubernetesNodePool", &tencentcloud.KubernetesNodePoolArgs{
ClusterId: exampleKubernetesCluster.KubernetesClusterId,
MaxSize: pulumi.Float64(6),
MinSize: pulumi.Float64(1),
VpcId: pulumi.String(firstVpcId),
SubnetIds: pulumi.StringArray{
pulumi.String(firstSubnetId),
},
RetryPolicy: pulumi.String("INCREMENTAL_INTERVALS"),
DesiredCapacity: pulumi.Float64(4),
EnableAutoScale: pulumi.Bool(true),
MultiZoneSubnetPolicy: pulumi.String("EQUALITY"),
AutoScalingConfig: &tencentcloud.KubernetesNodePoolAutoScalingConfigArgs{
InstanceType: pulumi.String(defaultInstanceType),
SystemDiskType: pulumi.String("CLOUD_PREMIUM"),
SystemDiskSize: pulumi.Float64(50),
OrderlySecurityGroupIds: pulumi.StringArray{
pulumi.String(sgId),
},
DataDisks: tencentcloud.KubernetesNodePoolAutoScalingConfigDataDiskArray{
&tencentcloud.KubernetesNodePoolAutoScalingConfigDataDiskArgs{
DiskType: pulumi.String("CLOUD_PREMIUM"),
DiskSize: pulumi.Float64(50),
},
},
InternetChargeType: pulumi.String("TRAFFIC_POSTPAID_BY_HOUR"),
InternetMaxBandwidthOut: pulumi.Float64(10),
PublicIpAssigned: pulumi.Bool(true),
Password: pulumi.String("test123#"),
EnhancedSecurityService: pulumi.Bool(false),
EnhancedMonitorService: pulumi.Bool(false),
HostName: pulumi.String("12.123.0.0"),
HostNameStyle: pulumi.String("ORIGINAL"),
},
Labels: pulumi.StringMap{
"test1": pulumi.String("test1"),
"test2": pulumi.String("test2"),
},
Taints: tencentcloud.KubernetesNodePoolTaintArray{
&tencentcloud.KubernetesNodePoolTaintArgs{
Key: pulumi.String("test_taint"),
Value: pulumi.String("taint_value"),
Effect: pulumi.String("PreferNoSchedule"),
},
&tencentcloud.KubernetesNodePoolTaintArgs{
Key: pulumi.String("test_taint2"),
Value: pulumi.String("taint_value2"),
Effect: pulumi.String("PreferNoSchedule"),
},
},
NodeConfig: &tencentcloud.KubernetesNodePoolNodeConfigArgs{
ExtraArgs: pulumi.StringArray{
pulumi.String("root-dir=/var/lib/kubelet"),
},
},
})
if err != nil {
return err
}
_, err = tencentcloud.NewKubernetesClusterEndpoint(ctx, "exampleKubernetesClusterEndpoint", &tencentcloud.KubernetesClusterEndpointArgs{
ClusterId: exampleKubernetesCluster.KubernetesClusterId,
ClusterInternet: pulumi.Bool(true),
ClusterIntranet: pulumi.Bool(true),
ClusterInternetSecurityGroup: pulumi.String(sgId),
ClusterIntranetSubnetId: pulumi.String(firstSubnetId),
}, pulumi.DependsOn([]pulumi.Resource{
exampleKubernetesNodePool,
}))
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var defaultInstanceType = config.Get("defaultInstanceType") ?? "SA2.2XLARGE16";
var availabilityZoneFirst = config.Get("availabilityZoneFirst") ?? "ap-guangzhou-3";
var availabilityZoneSecond = config.Get("availabilityZoneSecond") ?? "ap-guangzhou-4";
var exampleClusterCidr = config.Get("exampleClusterCidr") ?? "10.31.0.0/16";
var vpcOne = Tencentcloud.GetVpcSubnets.Invoke(new()
{
IsDefault = true,
AvailabilityZone = availabilityZoneFirst,
});
var firstVpcId = vpcOne.Apply(getVpcSubnetsResult => getVpcSubnetsResult.InstanceLists[0]?.VpcId);
var firstSubnetId = vpcOne.Apply(getVpcSubnetsResult => getVpcSubnetsResult.InstanceLists[0]?.SubnetId);
var sg = new Tencentcloud.SecurityGroup("sg");
var sgId = sg.SecurityGroupId;
var vpcTwo = Tencentcloud.GetVpcSubnets.Invoke(new()
{
IsDefault = true,
AvailabilityZone = availabilityZoneSecond,
});
var sgRule = new Tencentcloud.SecurityGroupLiteRule("sgRule", new()
{
SecurityGroupId = sg.SecurityGroupId,
Ingresses = new[]
{
"ACCEPT#10.0.0.0/16#ALL#ALL",
"ACCEPT#172.16.0.0/22#ALL#ALL",
"DROP#0.0.0.0/0#ALL#ALL",
},
Egresses = new[]
{
"ACCEPT#172.16.0.0/22#ALL#ALL",
},
});
var exampleKubernetesCluster = new Tencentcloud.KubernetesCluster("exampleKubernetesCluster", new()
{
VpcId = firstVpcId,
ClusterCidr = exampleClusterCidr,
ClusterMaxPodNum = 32,
ClusterName = "tf_example_cluster",
ClusterDesc = "example for tke cluster",
ClusterMaxServiceNum = 32,
ClusterInternet = false,
ClusterVersion = "1.22.5",
ClusterDeployType = "MANAGED_CLUSTER",
});
// without any worker config
var exampleKubernetesNodePool = new Tencentcloud.KubernetesNodePool("exampleKubernetesNodePool", new()
{
ClusterId = exampleKubernetesCluster.KubernetesClusterId,
MaxSize = 6,
MinSize = 1,
VpcId = firstVpcId,
SubnetIds = new[]
{
firstSubnetId,
},
RetryPolicy = "INCREMENTAL_INTERVALS",
DesiredCapacity = 4,
EnableAutoScale = true,
MultiZoneSubnetPolicy = "EQUALITY",
AutoScalingConfig = new Tencentcloud.Inputs.KubernetesNodePoolAutoScalingConfigArgs
{
InstanceType = defaultInstanceType,
SystemDiskType = "CLOUD_PREMIUM",
SystemDiskSize = 50,
OrderlySecurityGroupIds = new[]
{
sgId,
},
DataDisks = new[]
{
new Tencentcloud.Inputs.KubernetesNodePoolAutoScalingConfigDataDiskArgs
{
DiskType = "CLOUD_PREMIUM",
DiskSize = 50,
},
},
InternetChargeType = "TRAFFIC_POSTPAID_BY_HOUR",
InternetMaxBandwidthOut = 10,
PublicIpAssigned = true,
Password = "test123#",
EnhancedSecurityService = false,
EnhancedMonitorService = false,
HostName = "12.123.0.0",
HostNameStyle = "ORIGINAL",
},
Labels =
{
{ "test1", "test1" },
{ "test2", "test2" },
},
Taints = new[]
{
new Tencentcloud.Inputs.KubernetesNodePoolTaintArgs
{
Key = "test_taint",
Value = "taint_value",
Effect = "PreferNoSchedule",
},
new Tencentcloud.Inputs.KubernetesNodePoolTaintArgs
{
Key = "test_taint2",
Value = "taint_value2",
Effect = "PreferNoSchedule",
},
},
NodeConfig = new Tencentcloud.Inputs.KubernetesNodePoolNodeConfigArgs
{
ExtraArgs = new[]
{
"root-dir=/var/lib/kubelet",
},
},
});
var exampleKubernetesClusterEndpoint = new Tencentcloud.KubernetesClusterEndpoint("exampleKubernetesClusterEndpoint", new()
{
ClusterId = exampleKubernetesCluster.KubernetesClusterId,
ClusterInternet = true,
ClusterIntranet = true,
ClusterInternetSecurityGroup = sgId,
ClusterIntranetSubnetId = firstSubnetId,
}, new CustomResourceOptions
{
DependsOn =
{
exampleKubernetesNodePool,
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.TencentcloudFunctions;
import com.pulumi.tencentcloud.inputs.GetVpcSubnetsArgs;
import com.pulumi.tencentcloud.SecurityGroup;
import com.pulumi.tencentcloud.SecurityGroupLiteRule;
import com.pulumi.tencentcloud.SecurityGroupLiteRuleArgs;
import com.pulumi.tencentcloud.KubernetesCluster;
import com.pulumi.tencentcloud.KubernetesClusterArgs;
import com.pulumi.tencentcloud.KubernetesNodePool;
import com.pulumi.tencentcloud.KubernetesNodePoolArgs;
import com.pulumi.tencentcloud.inputs.KubernetesNodePoolAutoScalingConfigArgs;
import com.pulumi.tencentcloud.inputs.KubernetesNodePoolTaintArgs;
import com.pulumi.tencentcloud.inputs.KubernetesNodePoolNodeConfigArgs;
import com.pulumi.tencentcloud.KubernetesClusterEndpoint;
import com.pulumi.tencentcloud.KubernetesClusterEndpointArgs;
import com.pulumi.resources.CustomResourceOptions;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var config = ctx.config();
final var defaultInstanceType = config.get("defaultInstanceType").orElse("SA2.2XLARGE16");
final var availabilityZoneFirst = config.get("availabilityZoneFirst").orElse("ap-guangzhou-3");
final var availabilityZoneSecond = config.get("availabilityZoneSecond").orElse("ap-guangzhou-4");
final var exampleClusterCidr = config.get("exampleClusterCidr").orElse("10.31.0.0/16");
final var vpcOne = TencentcloudFunctions.getVpcSubnets(GetVpcSubnetsArgs.builder()
.isDefault(true)
.availabilityZone(availabilityZoneFirst)
.build());
final var firstVpcId = vpcOne.applyValue(getVpcSubnetsResult -> getVpcSubnetsResult.instanceLists()[0].vpcId());
final var firstSubnetId = vpcOne.applyValue(getVpcSubnetsResult -> getVpcSubnetsResult.instanceLists()[0].subnetId());
var sg = new SecurityGroup("sg");
final var sgId = sg.securityGroupId();
final var vpcTwo = TencentcloudFunctions.getVpcSubnets(GetVpcSubnetsArgs.builder()
.isDefault(true)
.availabilityZone(availabilityZoneSecond)
.build());
var sgRule = new SecurityGroupLiteRule("sgRule", SecurityGroupLiteRuleArgs.builder()
.securityGroupId(sg.securityGroupId())
.ingresses(
"ACCEPT#10.0.0.0/16#ALL#ALL",
"ACCEPT#172.16.0.0/22#ALL#ALL",
"DROP#0.0.0.0/0#ALL#ALL")
.egresses("ACCEPT#172.16.0.0/22#ALL#ALL")
.build());
var exampleKubernetesCluster = new KubernetesCluster("exampleKubernetesCluster", KubernetesClusterArgs.builder()
.vpcId(firstVpcId)
.clusterCidr(exampleClusterCidr)
.clusterMaxPodNum(32)
.clusterName("tf_example_cluster")
.clusterDesc("example for tke cluster")
.clusterMaxServiceNum(32)
.clusterInternet(false)
.clusterVersion("1.22.5")
.clusterDeployType("MANAGED_CLUSTER")
.build());
// without any worker config
var exampleKubernetesNodePool = new KubernetesNodePool("exampleKubernetesNodePool", KubernetesNodePoolArgs.builder()
.clusterId(exampleKubernetesCluster.kubernetesClusterId())
.maxSize(6)
.minSize(1)
.vpcId(firstVpcId)
.subnetIds(firstSubnetId)
.retryPolicy("INCREMENTAL_INTERVALS")
.desiredCapacity(4)
.enableAutoScale(true)
.multiZoneSubnetPolicy("EQUALITY")
.autoScalingConfig(KubernetesNodePoolAutoScalingConfigArgs.builder()
.instanceType(defaultInstanceType)
.systemDiskType("CLOUD_PREMIUM")
.systemDiskSize("50")
.orderlySecurityGroupIds(sgId)
.dataDisks(KubernetesNodePoolAutoScalingConfigDataDiskArgs.builder()
.diskType("CLOUD_PREMIUM")
.diskSize(50)
.build())
.internetChargeType("TRAFFIC_POSTPAID_BY_HOUR")
.internetMaxBandwidthOut(10)
.publicIpAssigned(true)
.password("test123#")
.enhancedSecurityService(false)
.enhancedMonitorService(false)
.hostName("12.123.0.0")
.hostNameStyle("ORIGINAL")
.build())
.labels(Map.ofEntries(
Map.entry("test1", "test1"),
Map.entry("test2", "test2")
))
.taints(
KubernetesNodePoolTaintArgs.builder()
.key("test_taint")
.value("taint_value")
.effect("PreferNoSchedule")
.build(),
KubernetesNodePoolTaintArgs.builder()
.key("test_taint2")
.value("taint_value2")
.effect("PreferNoSchedule")
.build())
.nodeConfig(KubernetesNodePoolNodeConfigArgs.builder()
.extraArgs("root-dir=/var/lib/kubelet")
.build())
.build());
var exampleKubernetesClusterEndpoint = new KubernetesClusterEndpoint("exampleKubernetesClusterEndpoint", KubernetesClusterEndpointArgs.builder()
.clusterId(exampleKubernetesCluster.kubernetesClusterId())
.clusterInternet(true)
.clusterIntranet(true)
.clusterInternetSecurityGroup(sgId)
.clusterIntranetSubnetId(firstSubnetId)
.build(), CustomResourceOptions.builder()
.dependsOn(exampleKubernetesNodePool)
.build());
}
}
configuration:
defaultInstanceType:
type: string
default: SA2.2XLARGE16
availabilityZoneFirst:
type: string
default: ap-guangzhou-3
availabilityZoneSecond:
type: string
default: ap-guangzhou-4
exampleClusterCidr:
type: string
default: 10.31.0.0/16
resources:
sg:
type: tencentcloud:SecurityGroup
sgRule:
type: tencentcloud:SecurityGroupLiteRule
properties:
securityGroupId: ${sg.securityGroupId}
ingresses:
- ACCEPT#10.0.0.0/16#ALL#ALL
- ACCEPT#172.16.0.0/22#ALL#ALL
- DROP#0.0.0.0/0#ALL#ALL
egresses:
- ACCEPT#172.16.0.0/22#ALL#ALL
exampleKubernetesCluster:
type: tencentcloud:KubernetesCluster
properties:
vpcId: ${firstVpcId}
clusterCidr: ${exampleClusterCidr}
clusterMaxPodNum: 32
clusterName: tf_example_cluster
clusterDesc: example for tke cluster
clusterMaxServiceNum: 32
clusterInternet: false
# (can be ignored) open it after the nodes added
clusterVersion: 1.22.5
clusterDeployType: MANAGED_CLUSTER
exampleKubernetesNodePool:
type: tencentcloud:KubernetesNodePool
properties:
clusterId: ${exampleKubernetesCluster.kubernetesClusterId}
maxSize: 6
# set the node scaling range [1,6]
minSize: 1
vpcId: ${firstVpcId}
subnetIds:
- ${firstSubnetId}
retryPolicy: INCREMENTAL_INTERVALS
desiredCapacity: 4
enableAutoScale: true
multiZoneSubnetPolicy: EQUALITY
autoScalingConfig:
instanceType: ${defaultInstanceType}
systemDiskType: CLOUD_PREMIUM
systemDiskSize: '50'
orderlySecurityGroupIds:
- ${sgId}
dataDisks:
- diskType: CLOUD_PREMIUM
diskSize: 50
internetChargeType: TRAFFIC_POSTPAID_BY_HOUR
internetMaxBandwidthOut: 10
publicIpAssigned: true
password: test123#
enhancedSecurityService: false
enhancedMonitorService: false
hostName: 12.123.0.0
hostNameStyle: ORIGINAL
labels:
test1: test1
test2: test2
taints:
- key: test_taint
value: taint_value
effect: PreferNoSchedule
- key: test_taint2
value: taint_value2
effect: PreferNoSchedule
nodeConfig:
extraArgs:
- root-dir=/var/lib/kubelet
exampleKubernetesClusterEndpoint:
type: tencentcloud:KubernetesClusterEndpoint
properties:
clusterId: ${exampleKubernetesCluster.kubernetesClusterId}
clusterInternet: true
# open the internet here
clusterIntranet: true
clusterInternetSecurityGroup: ${sgId}
clusterIntranetSubnetId: ${firstSubnetId}
options:
dependsOn:
- ${exampleKubernetesNodePool}
variables:
firstVpcId: ${vpcOne.instanceLists[0].vpcId}
firstSubnetId: ${vpcOne.instanceLists[0].subnetId}
sgId: ${sg.securityGroupId}
vpcOne:
fn::invoke:
function: tencentcloud:getVpcSubnets
arguments:
isDefault: true
availabilityZone: ${availabilityZoneFirst}
vpcTwo:
fn::invoke:
function: tencentcloud:getVpcSubnets
arguments:
isDefault: true
availabilityZone: ${availabilityZoneSecond}
Use Kubelet
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const config = new pulumi.Config();
const defaultInstanceType = config.get("defaultInstanceType") || "SA2.2XLARGE16";
const availabilityZoneFirst = config.get("availabilityZoneFirst") || "ap-guangzhou-3";
const availabilityZoneSecond = config.get("availabilityZoneSecond") || "ap-guangzhou-4";
const exampleClusterCidr = config.get("exampleClusterCidr") || "10.31.0.0/16";
const vpcOne = tencentcloud.getVpcSubnets({
isDefault: true,
availabilityZone: availabilityZoneFirst,
});
const firstVpcId = vpcOne.then(vpcOne => vpcOne.instanceLists?.[0]?.vpcId);
const firstSubnetId = vpcOne.then(vpcOne => vpcOne.instanceLists?.[0]?.subnetId);
const vpcTwo = tencentcloud.getVpcSubnets({
isDefault: true,
availabilityZone: availabilityZoneSecond,
});
const secondVpcId = vpcTwo.then(vpcTwo => vpcTwo.instanceLists?.[0]?.vpcId);
const secondSubnetId = vpcTwo.then(vpcTwo => vpcTwo.instanceLists?.[0]?.subnetId);
const sg = new tencentcloud.SecurityGroup("sg", {});
const sgId = sg.securityGroupId;
const _default = tencentcloud.getImages({
imageTypes: ["PUBLIC_IMAGE"],
imageNameRegex: "Final",
});
const imageId = _default.then(_default => _default.imageId);
const sgRule = new tencentcloud.SecurityGroupLiteRule("sgRule", {
securityGroupId: sg.securityGroupId,
ingresses: [
"ACCEPT#10.0.0.0/16#ALL#ALL",
"ACCEPT#172.16.0.0/22#ALL#ALL",
"DROP#0.0.0.0/0#ALL#ALL",
],
egresses: ["ACCEPT#172.16.0.0/22#ALL#ALL"],
});
const example = new tencentcloud.KubernetesCluster("example", {
vpcId: firstVpcId,
clusterCidr: exampleClusterCidr,
clusterMaxPodNum: 32,
clusterName: "tf_example_cluster",
clusterDesc: "example for tke cluster",
clusterMaxServiceNum: 32,
clusterInternet: false,
clusterInternetSecurityGroup: sgId,
clusterVersion: "1.22.5",
clusterDeployType: "MANAGED_CLUSTER",
workerConfigs: [
{
count: 1,
availabilityZone: availabilityZoneFirst,
instanceType: defaultInstanceType,
systemDiskType: "CLOUD_SSD",
systemDiskSize: 60,
internetChargeType: "TRAFFIC_POSTPAID_BY_HOUR",
internetMaxBandwidthOut: 100,
publicIpAssigned: true,
subnetId: firstSubnetId,
dataDisks: [{
diskType: "CLOUD_PREMIUM",
diskSize: 50,
encrypt: false,
}],
enhancedSecurityService: false,
enhancedMonitorService: false,
userData: "dGVzdA==",
disasterRecoverGroupIds: [],
securityGroupIds: [],
keyIds: [],
password: "ZZXXccvv1212",
},
{
count: 1,
availabilityZone: availabilityZoneSecond,
instanceType: defaultInstanceType,
systemDiskType: "CLOUD_SSD",
systemDiskSize: 60,
internetChargeType: "TRAFFIC_POSTPAID_BY_HOUR",
internetMaxBandwidthOut: 100,
publicIpAssigned: true,
subnetId: secondSubnetId,
dataDisks: [{
diskType: "CLOUD_PREMIUM",
diskSize: 50,
}],
enhancedSecurityService: false,
enhancedMonitorService: false,
userData: "dGVzdA==",
disasterRecoverGroupIds: [],
securityGroupIds: [],
keyIds: [],
camRoleName: "CVM_QcsRole",
password: "ZZXXccvv1212",
},
],
labels: {
test1: "test1",
test2: "test2",
},
extraArgs: ["root-dir=/var/lib/kubelet"],
});
import pulumi
import pulumi_tencentcloud as tencentcloud
config = pulumi.Config()
default_instance_type = config.get("defaultInstanceType")
if default_instance_type is None:
default_instance_type = "SA2.2XLARGE16"
availability_zone_first = config.get("availabilityZoneFirst")
if availability_zone_first is None:
availability_zone_first = "ap-guangzhou-3"
availability_zone_second = config.get("availabilityZoneSecond")
if availability_zone_second is None:
availability_zone_second = "ap-guangzhou-4"
example_cluster_cidr = config.get("exampleClusterCidr")
if example_cluster_cidr is None:
example_cluster_cidr = "10.31.0.0/16"
vpc_one = tencentcloud.get_vpc_subnets(is_default=True,
availability_zone=availability_zone_first)
first_vpc_id = vpc_one.instance_lists[0].vpc_id
first_subnet_id = vpc_one.instance_lists[0].subnet_id
vpc_two = tencentcloud.get_vpc_subnets(is_default=True,
availability_zone=availability_zone_second)
second_vpc_id = vpc_two.instance_lists[0].vpc_id
second_subnet_id = vpc_two.instance_lists[0].subnet_id
sg = tencentcloud.SecurityGroup("sg")
sg_id = sg.security_group_id
default = tencentcloud.get_images(image_types=["PUBLIC_IMAGE"],
image_name_regex="Final")
image_id = default.image_id
sg_rule = tencentcloud.SecurityGroupLiteRule("sgRule",
security_group_id=sg.security_group_id,
ingresses=[
"ACCEPT#10.0.0.0/16#ALL#ALL",
"ACCEPT#172.16.0.0/22#ALL#ALL",
"DROP#0.0.0.0/0#ALL#ALL",
],
egresses=["ACCEPT#172.16.0.0/22#ALL#ALL"])
example = tencentcloud.KubernetesCluster("example",
vpc_id=first_vpc_id,
cluster_cidr=example_cluster_cidr,
cluster_max_pod_num=32,
cluster_name="tf_example_cluster",
cluster_desc="example for tke cluster",
cluster_max_service_num=32,
cluster_internet=False,
cluster_internet_security_group=sg_id,
cluster_version="1.22.5",
cluster_deploy_type="MANAGED_CLUSTER",
worker_configs=[
{
"count": 1,
"availability_zone": availability_zone_first,
"instance_type": default_instance_type,
"system_disk_type": "CLOUD_SSD",
"system_disk_size": 60,
"internet_charge_type": "TRAFFIC_POSTPAID_BY_HOUR",
"internet_max_bandwidth_out": 100,
"public_ip_assigned": True,
"subnet_id": first_subnet_id,
"data_disks": [{
"disk_type": "CLOUD_PREMIUM",
"disk_size": 50,
"encrypt": False,
}],
"enhanced_security_service": False,
"enhanced_monitor_service": False,
"user_data": "dGVzdA==",
"disaster_recover_group_ids": [],
"security_group_ids": [],
"key_ids": [],
"password": "ZZXXccvv1212",
},
{
"count": 1,
"availability_zone": availability_zone_second,
"instance_type": default_instance_type,
"system_disk_type": "CLOUD_SSD",
"system_disk_size": 60,
"internet_charge_type": "TRAFFIC_POSTPAID_BY_HOUR",
"internet_max_bandwidth_out": 100,
"public_ip_assigned": True,
"subnet_id": second_subnet_id,
"data_disks": [{
"disk_type": "CLOUD_PREMIUM",
"disk_size": 50,
}],
"enhanced_security_service": False,
"enhanced_monitor_service": False,
"user_data": "dGVzdA==",
"disaster_recover_group_ids": [],
"security_group_ids": [],
"key_ids": [],
"cam_role_name": "CVM_QcsRole",
"password": "ZZXXccvv1212",
},
],
labels={
"test1": "test1",
"test2": "test2",
},
extra_args=["root-dir=/var/lib/kubelet"])
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
defaultInstanceType := "SA2.2XLARGE16"
if param := cfg.Get("defaultInstanceType"); param != "" {
defaultInstanceType = param
}
availabilityZoneFirst := "ap-guangzhou-3"
if param := cfg.Get("availabilityZoneFirst"); param != "" {
availabilityZoneFirst = param
}
availabilityZoneSecond := "ap-guangzhou-4"
if param := cfg.Get("availabilityZoneSecond"); param != "" {
availabilityZoneSecond = param
}
exampleClusterCidr := "10.31.0.0/16"
if param := cfg.Get("exampleClusterCidr"); param != "" {
exampleClusterCidr = param
}
vpcOne, err := tencentcloud.GetVpcSubnets(ctx, &tencentcloud.GetVpcSubnetsArgs{
IsDefault: pulumi.BoolRef(true),
AvailabilityZone: pulumi.StringRef(availabilityZoneFirst),
}, nil)
if err != nil {
return err
}
firstVpcId := vpcOne.InstanceLists[0].VpcId
firstSubnetId := vpcOne.InstanceLists[0].SubnetId
vpcTwo, err := tencentcloud.GetVpcSubnets(ctx, &tencentcloud.GetVpcSubnetsArgs{
IsDefault: pulumi.BoolRef(true),
AvailabilityZone: pulumi.StringRef(availabilityZoneSecond),
}, nil)
if err != nil {
return err
}
_ := vpcTwo.InstanceLists[0].VpcId
secondSubnetId := vpcTwo.InstanceLists[0].SubnetId
sg, err := tencentcloud.NewSecurityGroup(ctx, "sg", nil)
if err != nil {
return err
}
sgId := sg.SecurityGroupId
_default, err := tencentcloud.GetImages(ctx, &tencentcloud.GetImagesArgs{
ImageTypes: []string{
"PUBLIC_IMAGE",
},
ImageNameRegex: pulumi.StringRef("Final"),
}, nil)
if err != nil {
return err
}
_ := _default.ImageId
_, err = tencentcloud.NewSecurityGroupLiteRule(ctx, "sgRule", &tencentcloud.SecurityGroupLiteRuleArgs{
SecurityGroupId: sg.SecurityGroupId,
Ingresses: pulumi.StringArray{
pulumi.String("ACCEPT#10.0.0.0/16#ALL#ALL"),
pulumi.String("ACCEPT#172.16.0.0/22#ALL#ALL"),
pulumi.String("DROP#0.0.0.0/0#ALL#ALL"),
},
Egresses: pulumi.StringArray{
pulumi.String("ACCEPT#172.16.0.0/22#ALL#ALL"),
},
})
if err != nil {
return err
}
_, err = tencentcloud.NewKubernetesCluster(ctx, "example", &tencentcloud.KubernetesClusterArgs{
VpcId: pulumi.String(firstVpcId),
ClusterCidr: pulumi.String(exampleClusterCidr),
ClusterMaxPodNum: pulumi.Float64(32),
ClusterName: pulumi.String("tf_example_cluster"),
ClusterDesc: pulumi.String("example for tke cluster"),
ClusterMaxServiceNum: pulumi.Float64(32),
ClusterInternet: pulumi.Bool(false),
ClusterInternetSecurityGroup: pulumi.String(sgId),
ClusterVersion: pulumi.String("1.22.5"),
ClusterDeployType: pulumi.String("MANAGED_CLUSTER"),
WorkerConfigs: tencentcloud.KubernetesClusterWorkerConfigArray{
&tencentcloud.KubernetesClusterWorkerConfigArgs{
Count: pulumi.Float64(1),
AvailabilityZone: pulumi.String(availabilityZoneFirst),
InstanceType: pulumi.String(defaultInstanceType),
SystemDiskType: pulumi.String("CLOUD_SSD"),
SystemDiskSize: pulumi.Float64(60),
InternetChargeType: pulumi.String("TRAFFIC_POSTPAID_BY_HOUR"),
InternetMaxBandwidthOut: pulumi.Float64(100),
PublicIpAssigned: pulumi.Bool(true),
SubnetId: pulumi.String(firstSubnetId),
DataDisks: tencentcloud.KubernetesClusterWorkerConfigDataDiskArray{
&tencentcloud.KubernetesClusterWorkerConfigDataDiskArgs{
DiskType: pulumi.String("CLOUD_PREMIUM"),
DiskSize: pulumi.Float64(50),
Encrypt: pulumi.Bool(false),
},
},
EnhancedSecurityService: pulumi.Bool(false),
EnhancedMonitorService: pulumi.Bool(false),
UserData: pulumi.String("dGVzdA=="),
DisasterRecoverGroupIds: pulumi.StringArray{},
SecurityGroupIds: pulumi.StringArray{},
KeyIds: pulumi.StringArray{},
Password: pulumi.String("ZZXXccvv1212"),
},
&tencentcloud.KubernetesClusterWorkerConfigArgs{
Count: pulumi.Float64(1),
AvailabilityZone: pulumi.String(availabilityZoneSecond),
InstanceType: pulumi.String(defaultInstanceType),
SystemDiskType: pulumi.String("CLOUD_SSD"),
SystemDiskSize: pulumi.Float64(60),
InternetChargeType: pulumi.String("TRAFFIC_POSTPAID_BY_HOUR"),
InternetMaxBandwidthOut: pulumi.Float64(100),
PublicIpAssigned: pulumi.Bool(true),
SubnetId: pulumi.String(secondSubnetId),
DataDisks: tencentcloud.KubernetesClusterWorkerConfigDataDiskArray{
&tencentcloud.KubernetesClusterWorkerConfigDataDiskArgs{
DiskType: pulumi.String("CLOUD_PREMIUM"),
DiskSize: pulumi.Float64(50),
},
},
EnhancedSecurityService: pulumi.Bool(false),
EnhancedMonitorService: pulumi.Bool(false),
UserData: pulumi.String("dGVzdA=="),
DisasterRecoverGroupIds: pulumi.StringArray{},
SecurityGroupIds: pulumi.StringArray{},
KeyIds: pulumi.StringArray{},
CamRoleName: pulumi.String("CVM_QcsRole"),
Password: pulumi.String("ZZXXccvv1212"),
},
},
Labels: pulumi.StringMap{
"test1": pulumi.String("test1"),
"test2": pulumi.String("test2"),
},
ExtraArgs: pulumi.StringArray{
pulumi.String("root-dir=/var/lib/kubelet"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var defaultInstanceType = config.Get("defaultInstanceType") ?? "SA2.2XLARGE16";
var availabilityZoneFirst = config.Get("availabilityZoneFirst") ?? "ap-guangzhou-3";
var availabilityZoneSecond = config.Get("availabilityZoneSecond") ?? "ap-guangzhou-4";
var exampleClusterCidr = config.Get("exampleClusterCidr") ?? "10.31.0.0/16";
var vpcOne = Tencentcloud.GetVpcSubnets.Invoke(new()
{
IsDefault = true,
AvailabilityZone = availabilityZoneFirst,
});
var firstVpcId = vpcOne.Apply(getVpcSubnetsResult => getVpcSubnetsResult.InstanceLists[0]?.VpcId);
var firstSubnetId = vpcOne.Apply(getVpcSubnetsResult => getVpcSubnetsResult.InstanceLists[0]?.SubnetId);
var vpcTwo = Tencentcloud.GetVpcSubnets.Invoke(new()
{
IsDefault = true,
AvailabilityZone = availabilityZoneSecond,
});
var secondVpcId = vpcTwo.Apply(getVpcSubnetsResult => getVpcSubnetsResult.InstanceLists[0]?.VpcId);
var secondSubnetId = vpcTwo.Apply(getVpcSubnetsResult => getVpcSubnetsResult.InstanceLists[0]?.SubnetId);
var sg = new Tencentcloud.SecurityGroup("sg");
var sgId = sg.SecurityGroupId;
var @default = Tencentcloud.GetImages.Invoke(new()
{
ImageTypes = new[]
{
"PUBLIC_IMAGE",
},
ImageNameRegex = "Final",
});
var imageId = @default.Apply(@default => @default.Apply(getImagesResult => getImagesResult.ImageId));
var sgRule = new Tencentcloud.SecurityGroupLiteRule("sgRule", new()
{
SecurityGroupId = sg.SecurityGroupId,
Ingresses = new[]
{
"ACCEPT#10.0.0.0/16#ALL#ALL",
"ACCEPT#172.16.0.0/22#ALL#ALL",
"DROP#0.0.0.0/0#ALL#ALL",
},
Egresses = new[]
{
"ACCEPT#172.16.0.0/22#ALL#ALL",
},
});
var example = new Tencentcloud.KubernetesCluster("example", new()
{
VpcId = firstVpcId,
ClusterCidr = exampleClusterCidr,
ClusterMaxPodNum = 32,
ClusterName = "tf_example_cluster",
ClusterDesc = "example for tke cluster",
ClusterMaxServiceNum = 32,
ClusterInternet = false,
ClusterInternetSecurityGroup = sgId,
ClusterVersion = "1.22.5",
ClusterDeployType = "MANAGED_CLUSTER",
WorkerConfigs = new[]
{
new Tencentcloud.Inputs.KubernetesClusterWorkerConfigArgs
{
Count = 1,
AvailabilityZone = availabilityZoneFirst,
InstanceType = defaultInstanceType,
SystemDiskType = "CLOUD_SSD",
SystemDiskSize = 60,
InternetChargeType = "TRAFFIC_POSTPAID_BY_HOUR",
InternetMaxBandwidthOut = 100,
PublicIpAssigned = true,
SubnetId = firstSubnetId,
DataDisks = new[]
{
new Tencentcloud.Inputs.KubernetesClusterWorkerConfigDataDiskArgs
{
DiskType = "CLOUD_PREMIUM",
DiskSize = 50,
Encrypt = false,
},
},
EnhancedSecurityService = false,
EnhancedMonitorService = false,
UserData = "dGVzdA==",
DisasterRecoverGroupIds = new() { },
SecurityGroupIds = new() { },
KeyIds = new() { },
Password = "ZZXXccvv1212",
},
new Tencentcloud.Inputs.KubernetesClusterWorkerConfigArgs
{
Count = 1,
AvailabilityZone = availabilityZoneSecond,
InstanceType = defaultInstanceType,
SystemDiskType = "CLOUD_SSD",
SystemDiskSize = 60,
InternetChargeType = "TRAFFIC_POSTPAID_BY_HOUR",
InternetMaxBandwidthOut = 100,
PublicIpAssigned = true,
SubnetId = secondSubnetId,
DataDisks = new[]
{
new Tencentcloud.Inputs.KubernetesClusterWorkerConfigDataDiskArgs
{
DiskType = "CLOUD_PREMIUM",
DiskSize = 50,
},
},
EnhancedSecurityService = false,
EnhancedMonitorService = false,
UserData = "dGVzdA==",
DisasterRecoverGroupIds = new() { },
SecurityGroupIds = new() { },
KeyIds = new() { },
CamRoleName = "CVM_QcsRole",
Password = "ZZXXccvv1212",
},
},
Labels =
{
{ "test1", "test1" },
{ "test2", "test2" },
},
ExtraArgs = new[]
{
"root-dir=/var/lib/kubelet",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.TencentcloudFunctions;
import com.pulumi.tencentcloud.inputs.GetVpcSubnetsArgs;
import com.pulumi.tencentcloud.SecurityGroup;
import com.pulumi.tencentcloud.inputs.GetImagesArgs;
import com.pulumi.tencentcloud.SecurityGroupLiteRule;
import com.pulumi.tencentcloud.SecurityGroupLiteRuleArgs;
import com.pulumi.tencentcloud.KubernetesCluster;
import com.pulumi.tencentcloud.KubernetesClusterArgs;
import com.pulumi.tencentcloud.inputs.KubernetesClusterWorkerConfigArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var config = ctx.config();
final var defaultInstanceType = config.get("defaultInstanceType").orElse("SA2.2XLARGE16");
final var availabilityZoneFirst = config.get("availabilityZoneFirst").orElse("ap-guangzhou-3");
final var availabilityZoneSecond = config.get("availabilityZoneSecond").orElse("ap-guangzhou-4");
final var exampleClusterCidr = config.get("exampleClusterCidr").orElse("10.31.0.0/16");
final var vpcOne = TencentcloudFunctions.getVpcSubnets(GetVpcSubnetsArgs.builder()
.isDefault(true)
.availabilityZone(availabilityZoneFirst)
.build());
final var firstVpcId = vpcOne.applyValue(getVpcSubnetsResult -> getVpcSubnetsResult.instanceLists()[0].vpcId());
final var firstSubnetId = vpcOne.applyValue(getVpcSubnetsResult -> getVpcSubnetsResult.instanceLists()[0].subnetId());
final var vpcTwo = TencentcloudFunctions.getVpcSubnets(GetVpcSubnetsArgs.builder()
.isDefault(true)
.availabilityZone(availabilityZoneSecond)
.build());
final var secondVpcId = vpcTwo.applyValue(getVpcSubnetsResult -> getVpcSubnetsResult.instanceLists()[0].vpcId());
final var secondSubnetId = vpcTwo.applyValue(getVpcSubnetsResult -> getVpcSubnetsResult.instanceLists()[0].subnetId());
var sg = new SecurityGroup("sg");
final var sgId = sg.securityGroupId();
final var default = TencentcloudFunctions.getImages(GetImagesArgs.builder()
.imageTypes("PUBLIC_IMAGE")
.imageNameRegex("Final")
.build());
final var imageId = default_.imageId();
var sgRule = new SecurityGroupLiteRule("sgRule", SecurityGroupLiteRuleArgs.builder()
.securityGroupId(sg.securityGroupId())
.ingresses(
"ACCEPT#10.0.0.0/16#ALL#ALL",
"ACCEPT#172.16.0.0/22#ALL#ALL",
"DROP#0.0.0.0/0#ALL#ALL")
.egresses("ACCEPT#172.16.0.0/22#ALL#ALL")
.build());
var example = new KubernetesCluster("example", KubernetesClusterArgs.builder()
.vpcId(firstVpcId)
.clusterCidr(exampleClusterCidr)
.clusterMaxPodNum(32)
.clusterName("tf_example_cluster")
.clusterDesc("example for tke cluster")
.clusterMaxServiceNum(32)
.clusterInternet(false)
.clusterInternetSecurityGroup(sgId)
.clusterVersion("1.22.5")
.clusterDeployType("MANAGED_CLUSTER")
.workerConfigs(
KubernetesClusterWorkerConfigArgs.builder()
.count(1)
.availabilityZone(availabilityZoneFirst)
.instanceType(defaultInstanceType)
.systemDiskType("CLOUD_SSD")
.systemDiskSize(60)
.internetChargeType("TRAFFIC_POSTPAID_BY_HOUR")
.internetMaxBandwidthOut(100)
.publicIpAssigned(true)
.subnetId(firstSubnetId)
.dataDisks(KubernetesClusterWorkerConfigDataDiskArgs.builder()
.diskType("CLOUD_PREMIUM")
.diskSize(50)
.encrypt(false)
.build())
.enhancedSecurityService(false)
.enhancedMonitorService(false)
.userData("dGVzdA==")
.disasterRecoverGroupIds()
.securityGroupIds()
.keyIds()
.password("ZZXXccvv1212")
.build(),
KubernetesClusterWorkerConfigArgs.builder()
.count(1)
.availabilityZone(availabilityZoneSecond)
.instanceType(defaultInstanceType)
.systemDiskType("CLOUD_SSD")
.systemDiskSize(60)
.internetChargeType("TRAFFIC_POSTPAID_BY_HOUR")
.internetMaxBandwidthOut(100)
.publicIpAssigned(true)
.subnetId(secondSubnetId)
.dataDisks(KubernetesClusterWorkerConfigDataDiskArgs.builder()
.diskType("CLOUD_PREMIUM")
.diskSize(50)
.build())
.enhancedSecurityService(false)
.enhancedMonitorService(false)
.userData("dGVzdA==")
.disasterRecoverGroupIds()
.securityGroupIds()
.keyIds()
.camRoleName("CVM_QcsRole")
.password("ZZXXccvv1212")
.build())
.labels(Map.ofEntries(
Map.entry("test1", "test1"),
Map.entry("test2", "test2")
))
.extraArgs("root-dir=/var/lib/kubelet")
.build());
}
}
configuration:
# Create a baisc kubernetes cluster with two nodes.
defaultInstanceType:
type: string
default: SA2.2XLARGE16
availabilityZoneFirst:
type: string
default: ap-guangzhou-3
availabilityZoneSecond:
type: string
default: ap-guangzhou-4
exampleClusterCidr:
type: string
default: 10.31.0.0/16
resources:
sg:
type: tencentcloud:SecurityGroup
sgRule:
type: tencentcloud:SecurityGroupLiteRule
properties:
securityGroupId: ${sg.securityGroupId}
ingresses:
- ACCEPT#10.0.0.0/16#ALL#ALL
- ACCEPT#172.16.0.0/22#ALL#ALL
- DROP#0.0.0.0/0#ALL#ALL
egresses:
- ACCEPT#172.16.0.0/22#ALL#ALL
example:
type: tencentcloud:KubernetesCluster
properties:
vpcId: ${firstVpcId}
clusterCidr: ${exampleClusterCidr}
clusterMaxPodNum: 32
clusterName: tf_example_cluster
clusterDesc: example for tke cluster
clusterMaxServiceNum: 32
clusterInternet: false
clusterInternetSecurityGroup: ${sgId}
clusterVersion: 1.22.5
clusterDeployType: MANAGED_CLUSTER
workerConfigs:
- count: 1
availabilityZone: ${availabilityZoneFirst}
instanceType: ${defaultInstanceType}
systemDiskType: CLOUD_SSD
systemDiskSize: 60
internetChargeType: TRAFFIC_POSTPAID_BY_HOUR
internetMaxBandwidthOut: 100
publicIpAssigned: true
subnetId: ${firstSubnetId}
dataDisks:
- diskType: CLOUD_PREMIUM
diskSize: 50
encrypt: false
enhancedSecurityService: false
enhancedMonitorService: false
userData: dGVzdA==
disasterRecoverGroupIds: []
securityGroupIds: []
keyIds: []
password: ZZXXccvv1212
- count: 1
availabilityZone: ${availabilityZoneSecond}
instanceType: ${defaultInstanceType}
systemDiskType: CLOUD_SSD
systemDiskSize: 60
internetChargeType: TRAFFIC_POSTPAID_BY_HOUR
internetMaxBandwidthOut: 100
publicIpAssigned: true
subnetId: ${secondSubnetId}
dataDisks:
- diskType: CLOUD_PREMIUM
diskSize: 50
enhancedSecurityService: false
enhancedMonitorService: false
userData: dGVzdA==
disasterRecoverGroupIds: []
securityGroupIds: []
keyIds: []
camRoleName: CVM_QcsRole
password: ZZXXccvv1212
labels:
test1: test1
test2: test2
extraArgs:
- root-dir=/var/lib/kubelet
variables:
firstVpcId: ${vpcOne.instanceLists[0].vpcId}
firstSubnetId: ${vpcOne.instanceLists[0].subnetId}
secondVpcId: ${vpcTwo.instanceLists[0].vpcId}
secondSubnetId: ${vpcTwo.instanceLists[0].subnetId}
sgId: ${sg.securityGroupId}
imageId: ${default.imageId}
vpcOne:
fn::invoke:
function: tencentcloud:getVpcSubnets
arguments:
isDefault: true
availabilityZone: ${availabilityZoneFirst}
vpcTwo:
fn::invoke:
function: tencentcloud:getVpcSubnets
arguments:
isDefault: true
availabilityZone: ${availabilityZoneSecond}
default:
fn::invoke:
function: tencentcloud:getImages
arguments:
imageTypes:
- PUBLIC_IMAGE
imageNameRegex: Final
Use node pool global config
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const config = new pulumi.Config();
const availabilityZone = config.get("availabilityZone") || "ap-guangzhou-3";
const vpc = config.get("vpc") || "vpc-dk8zmwuf";
const subnet = config.get("subnet") || "subnet-pqfek0t8";
const defaultInstanceType = config.get("defaultInstanceType") || "SA1.LARGE8";
const testNodePoolGlobalConfig = new tencentcloud.KubernetesCluster("testNodePoolGlobalConfig", {
vpcId: vpc,
clusterCidr: "10.1.0.0/16",
clusterMaxPodNum: 32,
clusterName: "test",
clusterDesc: "test cluster desc",
clusterMaxServiceNum: 32,
clusterInternet: true,
clusterDeployType: "MANAGED_CLUSTER",
workerConfigs: [{
count: 1,
availabilityZone: availabilityZone,
instanceType: defaultInstanceType,
systemDiskType: "CLOUD_SSD",
systemDiskSize: 60,
internetChargeType: "TRAFFIC_POSTPAID_BY_HOUR",
internetMaxBandwidthOut: 100,
publicIpAssigned: true,
subnetId: subnet,
dataDisks: [{
diskType: "CLOUD_PREMIUM",
diskSize: 50,
}],
enhancedSecurityService: false,
enhancedMonitorService: false,
userData: "dGVzdA==",
keyIds: "skey-11112222",
}],
nodePoolGlobalConfigs: [{
isScaleInEnabled: true,
expander: "random",
ignoreDaemonSetsUtilization: true,
maxConcurrentScaleIn: 5,
scaleInDelay: 15,
scaleInUnneededTime: 15,
scaleInUtilizationThreshold: 30,
skipNodesWithLocalStorage: false,
skipNodesWithSystemPods: true,
}],
labels: {
test1: "test1",
test2: "test2",
},
});
import pulumi
import pulumi_tencentcloud as tencentcloud
config = pulumi.Config()
availability_zone = config.get("availabilityZone")
if availability_zone is None:
availability_zone = "ap-guangzhou-3"
vpc = config.get("vpc")
if vpc is None:
vpc = "vpc-dk8zmwuf"
subnet = config.get("subnet")
if subnet is None:
subnet = "subnet-pqfek0t8"
default_instance_type = config.get("defaultInstanceType")
if default_instance_type is None:
default_instance_type = "SA1.LARGE8"
test_node_pool_global_config = tencentcloud.KubernetesCluster("testNodePoolGlobalConfig",
vpc_id=vpc,
cluster_cidr="10.1.0.0/16",
cluster_max_pod_num=32,
cluster_name="test",
cluster_desc="test cluster desc",
cluster_max_service_num=32,
cluster_internet=True,
cluster_deploy_type="MANAGED_CLUSTER",
worker_configs=[{
"count": 1,
"availability_zone": availability_zone,
"instance_type": default_instance_type,
"system_disk_type": "CLOUD_SSD",
"system_disk_size": 60,
"internet_charge_type": "TRAFFIC_POSTPAID_BY_HOUR",
"internet_max_bandwidth_out": 100,
"public_ip_assigned": True,
"subnet_id": subnet,
"data_disks": [{
"disk_type": "CLOUD_PREMIUM",
"disk_size": 50,
}],
"enhanced_security_service": False,
"enhanced_monitor_service": False,
"user_data": "dGVzdA==",
"key_ids": "skey-11112222",
}],
node_pool_global_configs=[{
"is_scale_in_enabled": True,
"expander": "random",
"ignore_daemon_sets_utilization": True,
"max_concurrent_scale_in": 5,
"scale_in_delay": 15,
"scale_in_unneeded_time": 15,
"scale_in_utilization_threshold": 30,
"skip_nodes_with_local_storage": False,
"skip_nodes_with_system_pods": True,
}],
labels={
"test1": "test1",
"test2": "test2",
})
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
availabilityZone := "ap-guangzhou-3"
if param := cfg.Get("availabilityZone"); param != "" {
availabilityZone = param
}
vpc := "vpc-dk8zmwuf"
if param := cfg.Get("vpc"); param != "" {
vpc = param
}
subnet := "subnet-pqfek0t8"
if param := cfg.Get("subnet"); param != "" {
subnet = param
}
defaultInstanceType := "SA1.LARGE8"
if param := cfg.Get("defaultInstanceType"); param != "" {
defaultInstanceType = param
}
_, err := tencentcloud.NewKubernetesCluster(ctx, "testNodePoolGlobalConfig", &tencentcloud.KubernetesClusterArgs{
VpcId: pulumi.String(vpc),
ClusterCidr: pulumi.String("10.1.0.0/16"),
ClusterMaxPodNum: pulumi.Float64(32),
ClusterName: pulumi.String("test"),
ClusterDesc: pulumi.String("test cluster desc"),
ClusterMaxServiceNum: pulumi.Float64(32),
ClusterInternet: pulumi.Bool(true),
ClusterDeployType: pulumi.String("MANAGED_CLUSTER"),
WorkerConfigs: tencentcloud.KubernetesClusterWorkerConfigArray{
&tencentcloud.KubernetesClusterWorkerConfigArgs{
Count: pulumi.Float64(1),
AvailabilityZone: pulumi.String(availabilityZone),
InstanceType: pulumi.String(defaultInstanceType),
SystemDiskType: pulumi.String("CLOUD_SSD"),
SystemDiskSize: pulumi.Float64(60),
InternetChargeType: pulumi.String("TRAFFIC_POSTPAID_BY_HOUR"),
InternetMaxBandwidthOut: pulumi.Float64(100),
PublicIpAssigned: pulumi.Bool(true),
SubnetId: pulumi.String(subnet),
DataDisks: tencentcloud.KubernetesClusterWorkerConfigDataDiskArray{
&tencentcloud.KubernetesClusterWorkerConfigDataDiskArgs{
DiskType: pulumi.String("CLOUD_PREMIUM"),
DiskSize: pulumi.Float64(50),
},
},
EnhancedSecurityService: pulumi.Bool(false),
EnhancedMonitorService: pulumi.Bool(false),
UserData: pulumi.String("dGVzdA=="),
KeyIds: pulumi.StringArray("skey-11112222"),
},
},
NodePoolGlobalConfigs: tencentcloud.KubernetesClusterNodePoolGlobalConfigArray{
&tencentcloud.KubernetesClusterNodePoolGlobalConfigArgs{
IsScaleInEnabled: pulumi.Bool(true),
Expander: pulumi.String("random"),
IgnoreDaemonSetsUtilization: pulumi.Bool(true),
MaxConcurrentScaleIn: pulumi.Float64(5),
ScaleInDelay: pulumi.Float64(15),
ScaleInUnneededTime: pulumi.Float64(15),
ScaleInUtilizationThreshold: pulumi.Float64(30),
SkipNodesWithLocalStorage: pulumi.Bool(false),
SkipNodesWithSystemPods: pulumi.Bool(true),
},
},
Labels: pulumi.StringMap{
"test1": pulumi.String("test1"),
"test2": pulumi.String("test2"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var availabilityZone = config.Get("availabilityZone") ?? "ap-guangzhou-3";
var vpc = config.Get("vpc") ?? "vpc-dk8zmwuf";
var subnet = config.Get("subnet") ?? "subnet-pqfek0t8";
var defaultInstanceType = config.Get("defaultInstanceType") ?? "SA1.LARGE8";
var testNodePoolGlobalConfig = new Tencentcloud.KubernetesCluster("testNodePoolGlobalConfig", new()
{
VpcId = vpc,
ClusterCidr = "10.1.0.0/16",
ClusterMaxPodNum = 32,
ClusterName = "test",
ClusterDesc = "test cluster desc",
ClusterMaxServiceNum = 32,
ClusterInternet = true,
ClusterDeployType = "MANAGED_CLUSTER",
WorkerConfigs = new[]
{
new Tencentcloud.Inputs.KubernetesClusterWorkerConfigArgs
{
Count = 1,
AvailabilityZone = availabilityZone,
InstanceType = defaultInstanceType,
SystemDiskType = "CLOUD_SSD",
SystemDiskSize = 60,
InternetChargeType = "TRAFFIC_POSTPAID_BY_HOUR",
InternetMaxBandwidthOut = 100,
PublicIpAssigned = true,
SubnetId = subnet,
DataDisks = new[]
{
new Tencentcloud.Inputs.KubernetesClusterWorkerConfigDataDiskArgs
{
DiskType = "CLOUD_PREMIUM",
DiskSize = 50,
},
},
EnhancedSecurityService = false,
EnhancedMonitorService = false,
UserData = "dGVzdA==",
KeyIds = "skey-11112222",
},
},
NodePoolGlobalConfigs = new[]
{
new Tencentcloud.Inputs.KubernetesClusterNodePoolGlobalConfigArgs
{
IsScaleInEnabled = true,
Expander = "random",
IgnoreDaemonSetsUtilization = true,
MaxConcurrentScaleIn = 5,
ScaleInDelay = 15,
ScaleInUnneededTime = 15,
ScaleInUtilizationThreshold = 30,
SkipNodesWithLocalStorage = false,
SkipNodesWithSystemPods = true,
},
},
Labels =
{
{ "test1", "test1" },
{ "test2", "test2" },
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.KubernetesCluster;
import com.pulumi.tencentcloud.KubernetesClusterArgs;
import com.pulumi.tencentcloud.inputs.KubernetesClusterWorkerConfigArgs;
import com.pulumi.tencentcloud.inputs.KubernetesClusterNodePoolGlobalConfigArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var config = ctx.config();
final var availabilityZone = config.get("availabilityZone").orElse("ap-guangzhou-3");
final var vpc = config.get("vpc").orElse("vpc-dk8zmwuf");
final var subnet = config.get("subnet").orElse("subnet-pqfek0t8");
final var defaultInstanceType = config.get("defaultInstanceType").orElse("SA1.LARGE8");
var testNodePoolGlobalConfig = new KubernetesCluster("testNodePoolGlobalConfig", KubernetesClusterArgs.builder()
.vpcId(vpc)
.clusterCidr("10.1.0.0/16")
.clusterMaxPodNum(32)
.clusterName("test")
.clusterDesc("test cluster desc")
.clusterMaxServiceNum(32)
.clusterInternet(true)
.clusterDeployType("MANAGED_CLUSTER")
.workerConfigs(KubernetesClusterWorkerConfigArgs.builder()
.count(1)
.availabilityZone(availabilityZone)
.instanceType(defaultInstanceType)
.systemDiskType("CLOUD_SSD")
.systemDiskSize(60)
.internetChargeType("TRAFFIC_POSTPAID_BY_HOUR")
.internetMaxBandwidthOut(100)
.publicIpAssigned(true)
.subnetId(subnet)
.dataDisks(KubernetesClusterWorkerConfigDataDiskArgs.builder()
.diskType("CLOUD_PREMIUM")
.diskSize(50)
.build())
.enhancedSecurityService(false)
.enhancedMonitorService(false)
.userData("dGVzdA==")
.keyIds("skey-11112222")
.build())
.nodePoolGlobalConfigs(KubernetesClusterNodePoolGlobalConfigArgs.builder()
.isScaleInEnabled(true)
.expander("random")
.ignoreDaemonSetsUtilization(true)
.maxConcurrentScaleIn(5)
.scaleInDelay(15)
.scaleInUnneededTime(15)
.scaleInUtilizationThreshold(30)
.skipNodesWithLocalStorage(false)
.skipNodesWithSystemPods(true)
.build())
.labels(Map.ofEntries(
Map.entry("test1", "test1"),
Map.entry("test2", "test2")
))
.build());
}
}
configuration:
availabilityZone:
type: string
default: ap-guangzhou-3
vpc:
type: string
default: vpc-dk8zmwuf
subnet:
type: string
default: subnet-pqfek0t8
defaultInstanceType:
type: string
default: SA1.LARGE8
resources:
testNodePoolGlobalConfig:
type: tencentcloud:KubernetesCluster
properties:
vpcId: ${vpc}
clusterCidr: 10.1.0.0/16
clusterMaxPodNum: 32
clusterName: test
clusterDesc: test cluster desc
clusterMaxServiceNum: 32
clusterInternet: true
# managed_cluster_internet_security_policies = ["3.3.3.3", "1.1.1.1"]
clusterDeployType: MANAGED_CLUSTER
workerConfigs:
- count: 1
availabilityZone: ${availabilityZone}
instanceType: ${defaultInstanceType}
systemDiskType: CLOUD_SSD
systemDiskSize: 60
internetChargeType: TRAFFIC_POSTPAID_BY_HOUR
internetMaxBandwidthOut: 100
publicIpAssigned: true
subnetId: ${subnet}
dataDisks:
- diskType: CLOUD_PREMIUM
diskSize: 50
enhancedSecurityService: false
enhancedMonitorService: false
userData: dGVzdA==
keyIds: skey-11112222
nodePoolGlobalConfigs:
- isScaleInEnabled: true
expander: random
ignoreDaemonSetsUtilization: true
maxConcurrentScaleIn: 5
scaleInDelay: 15
scaleInUnneededTime: 15
scaleInUtilizationThreshold: 30
skipNodesWithLocalStorage: false
skipNodesWithSystemPods: true
labels:
test1: test1
test2: test2
Using VPC-CNI network type
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const config = new pulumi.Config();
const availabilityZone = config.get("availabilityZone") || "ap-guangzhou-1";
const vpc = config.get("vpc") || "vpc-r1m1fyx5";
const defaultInstanceType = config.get("defaultInstanceType") || "SA2.SMALL2";
const managedCluster = new tencentcloud.KubernetesCluster("managedCluster", {
vpcId: vpc,
clusterMaxPodNum: 32,
clusterName: "test",
clusterDesc: "test cluster desc",
clusterMaxServiceNum: 256,
clusterInternet: true,
clusterDeployType: "MANAGED_CLUSTER",
networkType: "VPC-CNI",
eniSubnetIds: ["subnet-bk1etlyu"],
serviceCidr: "10.1.0.0/24",
workerConfigs: [{
count: 1,
availabilityZone: availabilityZone,
instanceType: defaultInstanceType,
systemDiskType: "CLOUD_PREMIUM",
systemDiskSize: 60,
internetChargeType: "TRAFFIC_POSTPAID_BY_HOUR",
internetMaxBandwidthOut: 100,
publicIpAssigned: true,
subnetId: "subnet-t5dv27rs",
dataDisks: [{
diskType: "CLOUD_PREMIUM",
diskSize: 50,
}],
enhancedSecurityService: false,
enhancedMonitorService: false,
userData: "dGVzdA==",
keyIds: "skey-11112222",
}],
labels: {
test1: "test1",
test2: "test2",
},
});
import pulumi
import pulumi_tencentcloud as tencentcloud
config = pulumi.Config()
availability_zone = config.get("availabilityZone")
if availability_zone is None:
availability_zone = "ap-guangzhou-1"
vpc = config.get("vpc")
if vpc is None:
vpc = "vpc-r1m1fyx5"
default_instance_type = config.get("defaultInstanceType")
if default_instance_type is None:
default_instance_type = "SA2.SMALL2"
managed_cluster = tencentcloud.KubernetesCluster("managedCluster",
vpc_id=vpc,
cluster_max_pod_num=32,
cluster_name="test",
cluster_desc="test cluster desc",
cluster_max_service_num=256,
cluster_internet=True,
cluster_deploy_type="MANAGED_CLUSTER",
network_type="VPC-CNI",
eni_subnet_ids=["subnet-bk1etlyu"],
service_cidr="10.1.0.0/24",
worker_configs=[{
"count": 1,
"availability_zone": availability_zone,
"instance_type": default_instance_type,
"system_disk_type": "CLOUD_PREMIUM",
"system_disk_size": 60,
"internet_charge_type": "TRAFFIC_POSTPAID_BY_HOUR",
"internet_max_bandwidth_out": 100,
"public_ip_assigned": True,
"subnet_id": "subnet-t5dv27rs",
"data_disks": [{
"disk_type": "CLOUD_PREMIUM",
"disk_size": 50,
}],
"enhanced_security_service": False,
"enhanced_monitor_service": False,
"user_data": "dGVzdA==",
"key_ids": "skey-11112222",
}],
labels={
"test1": "test1",
"test2": "test2",
})
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
availabilityZone := "ap-guangzhou-1"
if param := cfg.Get("availabilityZone"); param != "" {
availabilityZone = param
}
vpc := "vpc-r1m1fyx5"
if param := cfg.Get("vpc"); param != "" {
vpc = param
}
defaultInstanceType := "SA2.SMALL2"
if param := cfg.Get("defaultInstanceType"); param != "" {
defaultInstanceType = param
}
_, err := tencentcloud.NewKubernetesCluster(ctx, "managedCluster", &tencentcloud.KubernetesClusterArgs{
VpcId: pulumi.String(vpc),
ClusterMaxPodNum: pulumi.Float64(32),
ClusterName: pulumi.String("test"),
ClusterDesc: pulumi.String("test cluster desc"),
ClusterMaxServiceNum: pulumi.Float64(256),
ClusterInternet: pulumi.Bool(true),
ClusterDeployType: pulumi.String("MANAGED_CLUSTER"),
NetworkType: pulumi.String("VPC-CNI"),
EniSubnetIds: pulumi.StringArray{
pulumi.String("subnet-bk1etlyu"),
},
ServiceCidr: pulumi.String("10.1.0.0/24"),
WorkerConfigs: tencentcloud.KubernetesClusterWorkerConfigArray{
&tencentcloud.KubernetesClusterWorkerConfigArgs{
Count: pulumi.Float64(1),
AvailabilityZone: pulumi.String(availabilityZone),
InstanceType: pulumi.String(defaultInstanceType),
SystemDiskType: pulumi.String("CLOUD_PREMIUM"),
SystemDiskSize: pulumi.Float64(60),
InternetChargeType: pulumi.String("TRAFFIC_POSTPAID_BY_HOUR"),
InternetMaxBandwidthOut: pulumi.Float64(100),
PublicIpAssigned: pulumi.Bool(true),
SubnetId: pulumi.String("subnet-t5dv27rs"),
DataDisks: tencentcloud.KubernetesClusterWorkerConfigDataDiskArray{
&tencentcloud.KubernetesClusterWorkerConfigDataDiskArgs{
DiskType: pulumi.String("CLOUD_PREMIUM"),
DiskSize: pulumi.Float64(50),
},
},
EnhancedSecurityService: pulumi.Bool(false),
EnhancedMonitorService: pulumi.Bool(false),
UserData: pulumi.String("dGVzdA=="),
KeyIds: pulumi.StringArray("skey-11112222"),
},
},
Labels: pulumi.StringMap{
"test1": pulumi.String("test1"),
"test2": pulumi.String("test2"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var availabilityZone = config.Get("availabilityZone") ?? "ap-guangzhou-1";
var vpc = config.Get("vpc") ?? "vpc-r1m1fyx5";
var defaultInstanceType = config.Get("defaultInstanceType") ?? "SA2.SMALL2";
var managedCluster = new Tencentcloud.KubernetesCluster("managedCluster", new()
{
VpcId = vpc,
ClusterMaxPodNum = 32,
ClusterName = "test",
ClusterDesc = "test cluster desc",
ClusterMaxServiceNum = 256,
ClusterInternet = true,
ClusterDeployType = "MANAGED_CLUSTER",
NetworkType = "VPC-CNI",
EniSubnetIds = new[]
{
"subnet-bk1etlyu",
},
ServiceCidr = "10.1.0.0/24",
WorkerConfigs = new[]
{
new Tencentcloud.Inputs.KubernetesClusterWorkerConfigArgs
{
Count = 1,
AvailabilityZone = availabilityZone,
InstanceType = defaultInstanceType,
SystemDiskType = "CLOUD_PREMIUM",
SystemDiskSize = 60,
InternetChargeType = "TRAFFIC_POSTPAID_BY_HOUR",
InternetMaxBandwidthOut = 100,
PublicIpAssigned = true,
SubnetId = "subnet-t5dv27rs",
DataDisks = new[]
{
new Tencentcloud.Inputs.KubernetesClusterWorkerConfigDataDiskArgs
{
DiskType = "CLOUD_PREMIUM",
DiskSize = 50,
},
},
EnhancedSecurityService = false,
EnhancedMonitorService = false,
UserData = "dGVzdA==",
KeyIds = "skey-11112222",
},
},
Labels =
{
{ "test1", "test1" },
{ "test2", "test2" },
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.KubernetesCluster;
import com.pulumi.tencentcloud.KubernetesClusterArgs;
import com.pulumi.tencentcloud.inputs.KubernetesClusterWorkerConfigArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var config = ctx.config();
final var availabilityZone = config.get("availabilityZone").orElse("ap-guangzhou-1");
final var vpc = config.get("vpc").orElse("vpc-r1m1fyx5");
final var defaultInstanceType = config.get("defaultInstanceType").orElse("SA2.SMALL2");
var managedCluster = new KubernetesCluster("managedCluster", KubernetesClusterArgs.builder()
.vpcId(vpc)
.clusterMaxPodNum(32)
.clusterName("test")
.clusterDesc("test cluster desc")
.clusterMaxServiceNum(256)
.clusterInternet(true)
.clusterDeployType("MANAGED_CLUSTER")
.networkType("VPC-CNI")
.eniSubnetIds("subnet-bk1etlyu")
.serviceCidr("10.1.0.0/24")
.workerConfigs(KubernetesClusterWorkerConfigArgs.builder()
.count(1)
.availabilityZone(availabilityZone)
.instanceType(defaultInstanceType)
.systemDiskType("CLOUD_PREMIUM")
.systemDiskSize(60)
.internetChargeType("TRAFFIC_POSTPAID_BY_HOUR")
.internetMaxBandwidthOut(100)
.publicIpAssigned(true)
.subnetId("subnet-t5dv27rs")
.dataDisks(KubernetesClusterWorkerConfigDataDiskArgs.builder()
.diskType("CLOUD_PREMIUM")
.diskSize(50)
.build())
.enhancedSecurityService(false)
.enhancedMonitorService(false)
.userData("dGVzdA==")
.keyIds("skey-11112222")
.build())
.labels(Map.ofEntries(
Map.entry("test1", "test1"),
Map.entry("test2", "test2")
))
.build());
}
}
configuration:
availabilityZone:
type: string
default: ap-guangzhou-1
vpc:
type: string
default: vpc-r1m1fyx5
defaultInstanceType:
type: string
default: SA2.SMALL2
resources:
managedCluster:
type: tencentcloud:KubernetesCluster
properties:
vpcId: ${vpc}
clusterMaxPodNum: 32
clusterName: test
clusterDesc: test cluster desc
clusterMaxServiceNum: 256
clusterInternet: true
clusterDeployType: MANAGED_CLUSTER
networkType: VPC-CNI
eniSubnetIds:
- subnet-bk1etlyu
serviceCidr: 10.1.0.0/24
workerConfigs:
- count: 1
availabilityZone: ${availabilityZone}
instanceType: ${defaultInstanceType}
systemDiskType: CLOUD_PREMIUM
systemDiskSize: 60
internetChargeType: TRAFFIC_POSTPAID_BY_HOUR
internetMaxBandwidthOut: 100
publicIpAssigned: true
subnetId: subnet-t5dv27rs
dataDisks:
- diskType: CLOUD_PREMIUM
diskSize: 50
enhancedSecurityService: false
enhancedMonitorService: false
userData: dGVzdA==
keyIds: skey-11112222
labels:
test1: test1
test2: test2
Using ops options
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const managedCluster = new tencentcloud.KubernetesCluster("managedCluster", {
clusterAudit: {
enabled: true,
logSetId: "",
topicId: "",
},
eventPersistence: {
enabled: true,
logSetId: "",
topicId: "",
},
logAgent: {
enabled: true,
kubeletRootDir: "",
},
});
import pulumi
import pulumi_tencentcloud as tencentcloud
managed_cluster = tencentcloud.KubernetesCluster("managedCluster",
cluster_audit={
"enabled": True,
"log_set_id": "",
"topic_id": "",
},
event_persistence={
"enabled": True,
"log_set_id": "",
"topic_id": "",
},
log_agent={
"enabled": True,
"kubelet_root_dir": "",
})
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := tencentcloud.NewKubernetesCluster(ctx, "managedCluster", &tencentcloud.KubernetesClusterArgs{
ClusterAudit: &tencentcloud.KubernetesClusterClusterAuditArgs{
Enabled: pulumi.Bool(true),
LogSetId: pulumi.String(""),
TopicId: pulumi.String(""),
},
EventPersistence: &tencentcloud.KubernetesClusterEventPersistenceArgs{
Enabled: pulumi.Bool(true),
LogSetId: pulumi.String(""),
TopicId: pulumi.String(""),
},
LogAgent: &tencentcloud.KubernetesClusterLogAgentArgs{
Enabled: pulumi.Bool(true),
KubeletRootDir: pulumi.String(""),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
var managedCluster = new Tencentcloud.KubernetesCluster("managedCluster", new()
{
ClusterAudit = new Tencentcloud.Inputs.KubernetesClusterClusterAuditArgs
{
Enabled = true,
LogSetId = "",
TopicId = "",
},
EventPersistence = new Tencentcloud.Inputs.KubernetesClusterEventPersistenceArgs
{
Enabled = true,
LogSetId = "",
TopicId = "",
},
LogAgent = new Tencentcloud.Inputs.KubernetesClusterLogAgentArgs
{
Enabled = true,
KubeletRootDir = "",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.KubernetesCluster;
import com.pulumi.tencentcloud.KubernetesClusterArgs;
import com.pulumi.tencentcloud.inputs.KubernetesClusterClusterAuditArgs;
import com.pulumi.tencentcloud.inputs.KubernetesClusterEventPersistenceArgs;
import com.pulumi.tencentcloud.inputs.KubernetesClusterLogAgentArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var managedCluster = new KubernetesCluster("managedCluster", KubernetesClusterArgs.builder()
.clusterAudit(KubernetesClusterClusterAuditArgs.builder()
.enabled(true)
.logSetId("")
.topicId("")
.build())
.eventPersistence(KubernetesClusterEventPersistenceArgs.builder()
.enabled(true)
.logSetId("")
.topicId("")
.build())
.logAgent(KubernetesClusterLogAgentArgs.builder()
.enabled(true)
.kubeletRootDir("")
.build())
.build());
}
}
resources:
managedCluster:
type: tencentcloud:KubernetesCluster
properties:
clusterAudit:
enabled: true
logSetId: ""
topicId: ""
eventPersistence:
enabled: true
logSetId: ""
topicId: ""
logAgent:
enabled: true
kubeletRootDir: ""
Create a CDC scenario cluster
Coming soon!
Coming soon!
Coming soon!
Coming soon!
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.KubernetesCluster;
import com.pulumi.tencentcloud.KubernetesClusterArgs;
import com.pulumi.tencentcloud.inputs.KubernetesClusterExistInstanceArgs;
import com.pulumi.tencentcloud.inputs.KubernetesClusterExistInstanceInstancesParaArgs;
import com.pulumi.tencentcloud.inputs.KubernetesClusterExistInstanceInstancesParaMasterConfigArgs;
import com.pulumi.tencentcloud.inputs.KubernetesClusterExistInstanceInstancesParaMasterConfigDataDiskArgs;
import com.pulumi.tencentcloud.inputs.KubernetesClusterExistInstanceInstancesParaMasterConfigExtraArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var cdcCluster = new KubernetesCluster("cdcCluster", KubernetesClusterArgs.builder()
.cdcId("cluster-262n63e8")
.clusterCidr("192.168.0.0/16")
.clusterDeployType("INDEPENDENT_CLUSTER")
.clusterDesc("test cluster desc")
.clusterLevel("L20")
.clusterMaxPodNum(64)
.clusterMaxServiceNum(1024)
.clusterName("test-cdc")
.clusterOs("tlinux3.1x86_64")
.clusterVersion("1.30.0")
.containerRuntime("containerd")
.existInstances(KubernetesClusterExistInstanceArgs.builder()
.instancesPara(KubernetesClusterExistInstanceInstancesParaArgs.builder()
.enhancedMonitorService(true)
.enhancedSecurityService(true)
.instanceIds(
"ins-mam0c7lw",
"ins-quvwayve",
"ins-qbffk8iw")
.masterConfig(KubernetesClusterExistInstanceInstancesParaMasterConfigArgs.builder()
.dataDisk(KubernetesClusterExistInstanceInstancesParaMasterConfigDataDiskArgs.builder()
.autoFormatAndMount(true)
.diskPartition("/dev/vdb")
.fileSystem("ext4")
.mountTarget("/var/data")
.build())
.dockerGraphPath("/var/lib/containerd")
.extraArgs(KubernetesClusterExistInstanceInstancesParaMasterConfigExtraArgs.builder()
.kubelet("root-dir=/root")
.build())
.labels(KubernetesClusterExistInstanceInstancesParaMasterConfigLabelArgs.builder()
.name("key")
.value("value")
.build())
.mountTarget("/var/data")
.taints(KubernetesClusterExistInstanceInstancesParaMasterConfigTaintArgs.builder()
.effect("NoSchedule")
.key("key")
.value("value")
.build())
.unschedulable(0)
.build())
.password("Password@123")
.securityGroupIds("sg-hjs685q9")
.build())
.nodeRole("MASTER_ETCD")
.build())
.instanceDeleteMode("retain")
.preStartUserScript("aXB0YWJsZXMgLUEgSU5QVVQgLXAgdGNwIC1zIDE2OS4yNTQuMC4wLzE5IC0tdGNwLWZsYWdzIFNZTixSU1QgU1lOIC1qIFRDUE1TUyAtLXNldC1tc3MgMTE2MAppcHRhYmxlcyAtQSBPVVRQVVQgLXAgdGNwIC1kIDE2OS4yNTQuMC4wLzE5IC0tdGNwLWZsYWdzIFNZTixSU1QgU1lOIC1qIFRDUE1TUyAtLXNldC1tc3MgMTE2MAoKZWNobyAnCmlwdGFibGVzIC1BIElOUFVUIC1wIHRjcCAtcyAxNjkuMjU0LjAuMC8xOSAtLXRjcC1mbGFncyBTWU4sUlNUIFNZTiAtaiBUQ1BNU1MgLS1zZXQtbXNzIDExNjAKaXB0YWJsZXMgLUEgT1VUUFVUIC1wIHRjcCAtZCAxNjkuMjU0LjAuMC8xOSAtLXRjcC1mbGFncyBTWU4sUlNUIFNZTiAtaiBUQ1BNU1MgLS1zZXQtbXNzIDExNjAKJyA+PiAvZXRjL3JjLmQvcmMubG9jYWw=")
.runtimeVersion("1.6.9")
.vpcId("vpc-0m6078eb")
.build());
}
}
resources:
cdcCluster:
type: tencentcloud:KubernetesCluster
properties:
cdcId: cluster-262n63e8
clusterCidr: 192.168.0.0/16
clusterDeployType: INDEPENDENT_CLUSTER
clusterDesc: test cluster desc
clusterLevel: L20
clusterMaxPodNum: 64
clusterMaxServiceNum: 1024
clusterName: test-cdc
clusterOs: tlinux3.1x86_64
clusterVersion: 1.30.0
containerRuntime: containerd
existInstances:
- instancesPara:
enhancedMonitorService: true
enhancedSecurityService: true
instanceIds:
- ins-mam0c7lw
- ins-quvwayve
- ins-qbffk8iw
masterConfig:
dataDisk:
autoFormatAndMount: true
diskPartition: /dev/vdb
fileSystem: ext4
mountTarget: /var/data
dockerGraphPath: /var/lib/containerd
extraArgs:
kubelet:
- root-dir=/root
labels:
- name: key
value: value
mountTarget: /var/data
taints:
- effect: NoSchedule
key: key
value: value
unschedulable: 0
password: Password@123
securityGroupIds:
- sg-hjs685q9
nodeRole: MASTER_ETCD
instanceDeleteMode: retain
preStartUserScript: aXB0YWJsZXMgLUEgSU5QVVQgLXAgdGNwIC1zIDE2OS4yNTQuMC4wLzE5IC0tdGNwLWZsYWdzIFNZTixSU1QgU1lOIC1qIFRDUE1TUyAtLXNldC1tc3MgMTE2MAppcHRhYmxlcyAtQSBPVVRQVVQgLXAgdGNwIC1kIDE2OS4yNTQuMC4wLzE5IC0tdGNwLWZsYWdzIFNZTixSU1QgU1lOIC1qIFRDUE1TUyAtLXNldC1tc3MgMTE2MAoKZWNobyAnCmlwdGFibGVzIC1BIElOUFVUIC1wIHRjcCAtcyAxNjkuMjU0LjAuMC8xOSAtLXRjcC1mbGFncyBTWU4sUlNUIFNZTiAtaiBUQ1BNU1MgLS1zZXQtbXNzIDExNjAKaXB0YWJsZXMgLUEgT1VUUFVUIC1wIHRjcCAtZCAxNjkuMjU0LjAuMC8xOSAtLXRjcC1mbGFncyBTWU4sUlNUIFNZTiAtaiBUQ1BNU1MgLS1zZXQtbXNzIDExNjAKJyA+PiAvZXRjL3JjLmQvcmMubG9jYWw=
runtimeVersion: 1.6.9
vpcId: vpc-0m6078eb
Use delete options to delete CBS when deleting the Cluster
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const example = new tencentcloud.KubernetesCluster("example", {
vpcId: local.first_vpc_id,
clusterCidr: _var.example_cluster_cidr,
clusterMaxPodNum: 32,
clusterName: "example",
clusterDesc: "example for tke cluster",
clusterMaxServiceNum: 32,
clusterLevel: "L50",
autoUpgradeClusterLevel: true,
clusterInternet: false,
clusterVersion: "1.30.0",
clusterOs: "tlinux2.2(tkernel3)x86_64",
clusterDeployType: "MANAGED_CLUSTER",
containerRuntime: "containerd",
dockerGraphPath: "/var/lib/containerd",
tags: {
demo: "test",
},
workerConfigs: [{
count: 1,
availabilityZone: _var.availability_zone_first,
instanceType: "SA2.MEDIUM2",
systemDiskType: "CLOUD_SSD",
systemDiskSize: 60,
internetChargeType: "TRAFFIC_POSTPAID_BY_HOUR",
internetMaxBandwidthOut: 100,
publicIpAssigned: true,
subnetId: local.first_subnet_id,
dataDisks: [{
diskType: "CLOUD_PREMIUM",
diskSize: 50,
}],
enhancedSecurityService: false,
enhancedMonitorService: false,
userData: "dGVzdA==",
disasterRecoverGroupIds: [],
securityGroupIds: [],
keyIds: [],
camRoleName: "CVM_QcsRole",
password: "ZZXXccvv1212",
}],
resourceDeleteOptions: [{
resourceType: "CBS",
deleteMode: "terminate",
}],
});
import pulumi
import pulumi_tencentcloud as tencentcloud
example = tencentcloud.KubernetesCluster("example",
vpc_id=local["first_vpc_id"],
cluster_cidr=var["example_cluster_cidr"],
cluster_max_pod_num=32,
cluster_name="example",
cluster_desc="example for tke cluster",
cluster_max_service_num=32,
cluster_level="L50",
auto_upgrade_cluster_level=True,
cluster_internet=False,
cluster_version="1.30.0",
cluster_os="tlinux2.2(tkernel3)x86_64",
cluster_deploy_type="MANAGED_CLUSTER",
container_runtime="containerd",
docker_graph_path="/var/lib/containerd",
tags={
"demo": "test",
},
worker_configs=[{
"count": 1,
"availability_zone": var["availability_zone_first"],
"instance_type": "SA2.MEDIUM2",
"system_disk_type": "CLOUD_SSD",
"system_disk_size": 60,
"internet_charge_type": "TRAFFIC_POSTPAID_BY_HOUR",
"internet_max_bandwidth_out": 100,
"public_ip_assigned": True,
"subnet_id": local["first_subnet_id"],
"data_disks": [{
"disk_type": "CLOUD_PREMIUM",
"disk_size": 50,
}],
"enhanced_security_service": False,
"enhanced_monitor_service": False,
"user_data": "dGVzdA==",
"disaster_recover_group_ids": [],
"security_group_ids": [],
"key_ids": [],
"cam_role_name": "CVM_QcsRole",
"password": "ZZXXccvv1212",
}],
resource_delete_options=[{
"resource_type": "CBS",
"delete_mode": "terminate",
}])
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := tencentcloud.NewKubernetesCluster(ctx, "example", &tencentcloud.KubernetesClusterArgs{
VpcId: pulumi.Any(local.First_vpc_id),
ClusterCidr: pulumi.Any(_var.Example_cluster_cidr),
ClusterMaxPodNum: pulumi.Float64(32),
ClusterName: pulumi.String("example"),
ClusterDesc: pulumi.String("example for tke cluster"),
ClusterMaxServiceNum: pulumi.Float64(32),
ClusterLevel: pulumi.String("L50"),
AutoUpgradeClusterLevel: pulumi.Bool(true),
ClusterInternet: pulumi.Bool(false),
ClusterVersion: pulumi.String("1.30.0"),
ClusterOs: pulumi.String("tlinux2.2(tkernel3)x86_64"),
ClusterDeployType: pulumi.String("MANAGED_CLUSTER"),
ContainerRuntime: pulumi.String("containerd"),
DockerGraphPath: pulumi.String("/var/lib/containerd"),
Tags: pulumi.StringMap{
"demo": pulumi.String("test"),
},
WorkerConfigs: tencentcloud.KubernetesClusterWorkerConfigArray{
&tencentcloud.KubernetesClusterWorkerConfigArgs{
Count: pulumi.Float64(1),
AvailabilityZone: pulumi.Any(_var.Availability_zone_first),
InstanceType: pulumi.String("SA2.MEDIUM2"),
SystemDiskType: pulumi.String("CLOUD_SSD"),
SystemDiskSize: pulumi.Float64(60),
InternetChargeType: pulumi.String("TRAFFIC_POSTPAID_BY_HOUR"),
InternetMaxBandwidthOut: pulumi.Float64(100),
PublicIpAssigned: pulumi.Bool(true),
SubnetId: pulumi.Any(local.First_subnet_id),
DataDisks: tencentcloud.KubernetesClusterWorkerConfigDataDiskArray{
&tencentcloud.KubernetesClusterWorkerConfigDataDiskArgs{
DiskType: pulumi.String("CLOUD_PREMIUM"),
DiskSize: pulumi.Float64(50),
},
},
EnhancedSecurityService: pulumi.Bool(false),
EnhancedMonitorService: pulumi.Bool(false),
UserData: pulumi.String("dGVzdA=="),
DisasterRecoverGroupIds: pulumi.StringArray{},
SecurityGroupIds: pulumi.StringArray{},
KeyIds: pulumi.StringArray{},
CamRoleName: pulumi.String("CVM_QcsRole"),
Password: pulumi.String("ZZXXccvv1212"),
},
},
ResourceDeleteOptions: tencentcloud.KubernetesClusterResourceDeleteOptionArray{
&tencentcloud.KubernetesClusterResourceDeleteOptionArgs{
ResourceType: pulumi.String("CBS"),
DeleteMode: pulumi.String("terminate"),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
var example = new Tencentcloud.KubernetesCluster("example", new()
{
VpcId = local.First_vpc_id,
ClusterCidr = @var.Example_cluster_cidr,
ClusterMaxPodNum = 32,
ClusterName = "example",
ClusterDesc = "example for tke cluster",
ClusterMaxServiceNum = 32,
ClusterLevel = "L50",
AutoUpgradeClusterLevel = true,
ClusterInternet = false,
ClusterVersion = "1.30.0",
ClusterOs = "tlinux2.2(tkernel3)x86_64",
ClusterDeployType = "MANAGED_CLUSTER",
ContainerRuntime = "containerd",
DockerGraphPath = "/var/lib/containerd",
Tags =
{
{ "demo", "test" },
},
WorkerConfigs = new[]
{
new Tencentcloud.Inputs.KubernetesClusterWorkerConfigArgs
{
Count = 1,
AvailabilityZone = @var.Availability_zone_first,
InstanceType = "SA2.MEDIUM2",
SystemDiskType = "CLOUD_SSD",
SystemDiskSize = 60,
InternetChargeType = "TRAFFIC_POSTPAID_BY_HOUR",
InternetMaxBandwidthOut = 100,
PublicIpAssigned = true,
SubnetId = local.First_subnet_id,
DataDisks = new[]
{
new Tencentcloud.Inputs.KubernetesClusterWorkerConfigDataDiskArgs
{
DiskType = "CLOUD_PREMIUM",
DiskSize = 50,
},
},
EnhancedSecurityService = false,
EnhancedMonitorService = false,
UserData = "dGVzdA==",
DisasterRecoverGroupIds = new() { },
SecurityGroupIds = new() { },
KeyIds = new() { },
CamRoleName = "CVM_QcsRole",
Password = "ZZXXccvv1212",
},
},
ResourceDeleteOptions = new[]
{
new Tencentcloud.Inputs.KubernetesClusterResourceDeleteOptionArgs
{
ResourceType = "CBS",
DeleteMode = "terminate",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.KubernetesCluster;
import com.pulumi.tencentcloud.KubernetesClusterArgs;
import com.pulumi.tencentcloud.inputs.KubernetesClusterWorkerConfigArgs;
import com.pulumi.tencentcloud.inputs.KubernetesClusterResourceDeleteOptionArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new KubernetesCluster("example", KubernetesClusterArgs.builder()
.vpcId(local.first_vpc_id())
.clusterCidr(var_.example_cluster_cidr())
.clusterMaxPodNum(32)
.clusterName("example")
.clusterDesc("example for tke cluster")
.clusterMaxServiceNum(32)
.clusterLevel("L50")
.autoUpgradeClusterLevel(true)
.clusterInternet(false)
.clusterVersion("1.30.0")
.clusterOs("tlinux2.2(tkernel3)x86_64")
.clusterDeployType("MANAGED_CLUSTER")
.containerRuntime("containerd")
.dockerGraphPath("/var/lib/containerd")
.tags(Map.of("demo", "test"))
.workerConfigs(KubernetesClusterWorkerConfigArgs.builder()
.count(1)
.availabilityZone(var_.availability_zone_first())
.instanceType("SA2.MEDIUM2")
.systemDiskType("CLOUD_SSD")
.systemDiskSize(60)
.internetChargeType("TRAFFIC_POSTPAID_BY_HOUR")
.internetMaxBandwidthOut(100)
.publicIpAssigned(true)
.subnetId(local.first_subnet_id())
.dataDisks(KubernetesClusterWorkerConfigDataDiskArgs.builder()
.diskType("CLOUD_PREMIUM")
.diskSize(50)
.build())
.enhancedSecurityService(false)
.enhancedMonitorService(false)
.userData("dGVzdA==")
.disasterRecoverGroupIds()
.securityGroupIds()
.keyIds()
.camRoleName("CVM_QcsRole")
.password("ZZXXccvv1212")
.build())
.resourceDeleteOptions(KubernetesClusterResourceDeleteOptionArgs.builder()
.resourceType("CBS")
.deleteMode("terminate")
.build())
.build());
}
}
resources:
example:
type: tencentcloud:KubernetesCluster
properties:
vpcId: ${local.first_vpc_id}
clusterCidr: ${var.example_cluster_cidr}
clusterMaxPodNum: 32
clusterName: example
clusterDesc: example for tke cluster
clusterMaxServiceNum: 32
clusterLevel: L50
autoUpgradeClusterLevel: true
clusterInternet: false
# (can be ignored) open it after the nodes added
clusterVersion: 1.30.0
clusterOs: tlinux2.2(tkernel3)x86_64
clusterDeployType: MANAGED_CLUSTER
containerRuntime: containerd
dockerGraphPath: /var/lib/containerd
# without any worker config
tags:
demo: test
workerConfigs:
- count: 1
availabilityZone: ${var.availability_zone_first}
instanceType: SA2.MEDIUM2
systemDiskType: CLOUD_SSD
systemDiskSize: 60
internetChargeType: TRAFFIC_POSTPAID_BY_HOUR
internetMaxBandwidthOut: 100
publicIpAssigned: true
subnetId: ${local.first_subnet_id}
dataDisks:
- diskType: CLOUD_PREMIUM
diskSize: 50
enhancedSecurityService: false
enhancedMonitorService: false
userData: dGVzdA==
disasterRecoverGroupIds: []
securityGroupIds: []
keyIds: []
camRoleName: CVM_QcsRole
password: ZZXXccvv1212
resourceDeleteOptions:
- resourceType: CBS
deleteMode: terminate
Create KubernetesCluster Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new KubernetesCluster(name: string, args: KubernetesClusterArgs, opts?: CustomResourceOptions);
@overload
def KubernetesCluster(resource_name: str,
args: KubernetesClusterArgs,
opts: Optional[ResourceOptions] = None)
@overload
def KubernetesCluster(resource_name: str,
opts: Optional[ResourceOptions] = None,
vpc_id: Optional[str] = None,
acquire_cluster_admin_role: Optional[bool] = None,
auth_options: Optional[KubernetesClusterAuthOptionsArgs] = None,
auto_upgrade_cluster_level: Optional[bool] = None,
base_pod_num: Optional[float] = None,
cdc_id: Optional[str] = None,
claim_expired_seconds: Optional[float] = None,
cluster_audit: Optional[KubernetesClusterClusterAuditArgs] = None,
cluster_cidr: Optional[str] = None,
cluster_deploy_type: Optional[str] = None,
cluster_desc: Optional[str] = None,
cluster_extra_args: Optional[KubernetesClusterClusterExtraArgsArgs] = None,
cluster_internet: Optional[bool] = None,
cluster_internet_domain: Optional[str] = None,
cluster_internet_security_group: Optional[str] = None,
cluster_intranet: Optional[bool] = None,
cluster_intranet_domain: Optional[str] = None,
cluster_intranet_subnet_id: Optional[str] = None,
cluster_ipvs: Optional[bool] = None,
cluster_level: Optional[str] = None,
cluster_max_pod_num: Optional[float] = None,
cluster_max_service_num: Optional[float] = None,
cluster_name: Optional[str] = None,
cluster_os: Optional[str] = None,
cluster_os_type: Optional[str] = None,
cluster_subnet_id: Optional[str] = None,
cluster_version: Optional[str] = None,
container_runtime: Optional[str] = None,
deletion_protection: Optional[bool] = None,
docker_graph_path: Optional[str] = None,
enable_customized_pod_cidr: Optional[bool] = None,
eni_subnet_ids: Optional[Sequence[str]] = None,
event_persistence: Optional[KubernetesClusterEventPersistenceArgs] = None,
exist_instances: Optional[Sequence[KubernetesClusterExistInstanceArgs]] = None,
extension_addons: Optional[Sequence[KubernetesClusterExtensionAddonArgs]] = None,
extra_args: Optional[Sequence[str]] = None,
globe_desired_pod_num: Optional[float] = None,
ignore_cluster_cidr_conflict: Optional[bool] = None,
ignore_service_cidr_conflict: Optional[bool] = None,
instance_delete_mode: Optional[str] = None,
is_non_static_ip_mode: Optional[bool] = None,
kube_proxy_mode: Optional[str] = None,
kubernetes_cluster_id: Optional[str] = None,
labels: Optional[Mapping[str, str]] = None,
log_agent: Optional[KubernetesClusterLogAgentArgs] = None,
managed_cluster_internet_security_policies: Optional[Sequence[str]] = None,
master_configs: Optional[Sequence[KubernetesClusterMasterConfigArgs]] = None,
mount_target: Optional[str] = None,
network_type: Optional[str] = None,
node_name_type: Optional[str] = None,
node_pool_global_configs: Optional[Sequence[KubernetesClusterNodePoolGlobalConfigArgs]] = None,
pre_start_user_script: Optional[str] = None,
project_id: Optional[float] = None,
resource_delete_options: Optional[Sequence[KubernetesClusterResourceDeleteOptionArgs]] = None,
runtime_version: Optional[str] = None,
service_cidr: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
unschedulable: Optional[float] = None,
upgrade_instances_follow_cluster: Optional[bool] = None,
vpc_cni_type: Optional[str] = None,
worker_configs: Optional[Sequence[KubernetesClusterWorkerConfigArgs]] = None)
func NewKubernetesCluster(ctx *Context, name string, args KubernetesClusterArgs, opts ...ResourceOption) (*KubernetesCluster, error)
public KubernetesCluster(string name, KubernetesClusterArgs args, CustomResourceOptions? opts = null)
public KubernetesCluster(String name, KubernetesClusterArgs args)
public KubernetesCluster(String name, KubernetesClusterArgs args, CustomResourceOptions options)
type: tencentcloud:KubernetesCluster
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args KubernetesClusterArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args KubernetesClusterArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args KubernetesClusterArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args KubernetesClusterArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args KubernetesClusterArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
KubernetesCluster Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The KubernetesCluster resource accepts the following input properties:
- Vpc
Id string - Vpc Id of the cluster.
- Acquire
Cluster boolAdmin Role - If set to true, it will acquire the ClusterRole tke:admin. NOTE: this arguments cannot revoke to
false
after acquired. - Auth
Options KubernetesCluster Auth Options - Specify cluster authentication configuration. Only available for managed cluster and
cluster_version
>= 1.20. - Auto
Upgrade boolCluster Level - Whether the cluster level auto upgraded, valid for managed cluster.
- Base
Pod doubleNum - The number of basic pods. valid when enable_customized_pod_cidr=true.
- Cdc
Id string - CDC ID.
- Claim
Expired doubleSeconds - Claim expired seconds to recycle ENI. This field can only set when field
network_type
is 'VPC-CNI'.claim_expired_seconds
must greater or equal than 300 and less than 15768000. - Cluster
Audit KubernetesCluster Cluster Audit - Specify Cluster Audit config. NOTE: Please make sure your TKE CamRole have permission to access CLS service.
- Cluster
Cidr string - A network address block of the cluster. Different from vpc cidr and cidr of other clusters within this vpc. Must be in 10./192.168/172.[16-31] segments.
- Cluster
Deploy stringType - Deployment type of the cluster, the available values include: 'MANAGED_CLUSTER' and 'INDEPENDENT_CLUSTER'. Default is 'MANAGED_CLUSTER'.
- Cluster
Desc string - Description of the cluster.
- Cluster
Extra KubernetesArgs Cluster Cluster Extra Args - Customized parameters for master component,such as kube-apiserver, kube-controller-manager, kube-scheduler.
- Cluster
Internet bool - Open internet access or not. If this field is set 'true', the field below
worker_config
must be set. Because only cluster with node is allowed enable access endpoint. You may open it throughtencentcloud.KubernetesClusterEndpoint
. - Cluster
Internet stringDomain - Domain name for cluster Kube-apiserver internet access. Be careful if you modify value of this parameter, the cluster_external_endpoint value may be changed automatically too.
- Cluster
Internet stringSecurity Group - Specify security group, NOTE: This argument must not be empty if cluster internet enabled.
- Cluster
Intranet bool - Open intranet access or not. If this field is set 'true', the field below
worker_config
must be set. Because only cluster with node is allowed enable access endpoint. You may open it throughtencentcloud.KubernetesClusterEndpoint
. - Cluster
Intranet stringDomain - Domain name for cluster Kube-apiserver intranet access. Be careful if you modify value of this parameter, the pgw_endpoint value may be changed automatically too.
- Cluster
Intranet stringSubnet Id - Subnet id who can access this independent cluster, this field must and can only set when
cluster_intranet
is true.cluster_intranet_subnet_id
can not modify once be set. - Cluster
Ipvs bool - Indicates whether
ipvs
is enabled. Default is true. False meansiptables
is enabled. - Cluster
Level string - Specify cluster level, valid for managed cluster, use data source
tencentcloud.getKubernetesClusterLevels
to query available levels. Available value examplesL5
,L20
,L50
,L100
, etc. - Cluster
Max doublePod Num - The maximum number of Pods per node in the cluster. Default is 256. The minimum value is 4. When its power unequal to 2, it will round upward to the closest power of 2.
- Cluster
Max doubleService Num - The maximum number of services in the cluster. Default is 256. The range is from 32 to 32768. When its power unequal to 2, it will round upward to the closest power of 2.
- Cluster
Name string - Name of the cluster.
- Cluster
Os string - Cluster operating system, supports setting public images (the field passes the corresponding image Name) and custom images (the field passes the corresponding image ID). For details, please refer to: https://cloud.tencent.com/document/product/457/68289.
- Cluster
Os stringType - Image type of the cluster os, the available values include: 'GENERAL'. Default is 'GENERAL'.
- Cluster
Subnet stringId - Subnet ID of the cluster, such as: subnet-b3p7d7q5.
- Cluster
Version string - Version of the cluster. Use
tencentcloud.getKubernetesAvailableClusterVersions
to get the upgradable cluster version. - Container
Runtime string - Runtime type of the cluster, the available values include: 'docker' and 'containerd'.The Kubernetes v1.24 has removed dockershim, so please use containerd in v1.24 or higher.Default is 'docker'.
- Deletion
Protection bool - Indicates whether cluster deletion protection is enabled. Default is false.
- Docker
Graph stringPath - Docker graph path. Default is
/var/lib/docker
. - Enable
Customized boolPod Cidr - Whether to enable the custom mode of node podCIDR size. Default is false.
- Eni
Subnet List<string>Ids - Subnet Ids for cluster with VPC-CNI network mode. This field can only set when field
network_type
is 'VPC-CNI'.eni_subnet_ids
can not empty once be set. - Event
Persistence KubernetesCluster Event Persistence - Specify cluster Event Persistence config. NOTE: Please make sure your TKE CamRole have permission to access CLS service.
- Exist
Instances List<KubernetesCluster Exist Instance> - create tke cluster by existed instances.
- Extension
Addons List<KubernetesCluster Extension Addon> - Information of the add-on to be installed.
- Extra
Args List<string> - Custom parameter information related to the node.
- Globe
Desired doublePod Num - Indicate to set desired pod number in node. valid when enable_customized_pod_cidr=true, and it takes effect for all nodes.
- Ignore
Cluster boolCidr Conflict - Indicates whether to ignore the cluster cidr conflict error. Default is false.
- Ignore
Service boolCidr Conflict - Indicates whether to ignore the service cidr conflict error. Only valid in
VPC-CNI
mode. - Instance
Delete stringMode - The strategy for deleting cluster instances: terminate (destroy instances, only support pay as you go cloud host instances) retain (remove only, keep instances), Default is terminate.
- Is
Non boolStatic Ip Mode - Indicates whether non-static ip mode is enabled. Default is false.
- Kube
Proxy stringMode - Cluster kube-proxy mode, the available values include: 'kube-proxy-bpf'. Default is not set.When set to kube-proxy-bpf, cluster version greater than 1.14 and with Tencent Linux 2.4 is required.
- Kubernetes
Cluster stringId - ID of the resource.
- Labels Dictionary<string, string>
- Labels of tke cluster nodes.
- Log
Agent KubernetesCluster Log Agent - Specify cluster log agent config.
- Managed
Cluster List<string>Internet Security Policies - this argument was deprecated, use
cluster_internet_security_group
instead. Security policies for managed cluster internet, like:'192.168.1.0/24' or '113.116.51.27', '0.0.0.0/0' means all. This field can only set when fieldcluster_deploy_type
is 'MANAGED_CLUSTER' andcluster_internet
is true.managed_cluster_internet_security_policies
can not delete or empty once be set. - Master
Configs List<KubernetesCluster Master Config> - Deploy the machine configuration information of the 'MASTER_ETCD' service, and create <=7 units for common users.
- Mount
Target string - Mount target. Default is not mounting.
- Network
Type string - Cluster network type, the available values include: 'GR' and 'VPC-CNI' and 'CiliumOverlay'. Default is GR.
- Node
Name stringType - Node name type of Cluster, the available values include: 'lan-ip' and 'hostname', Default is 'lan-ip'.
- Node
Pool List<KubernetesGlobal Configs Cluster Node Pool Global Config> - Global config effective for all node pools.
- Pre
Start stringUser Script - Base64-encoded user script, executed before initializing the node, currently only effective for adding existing nodes.
- Project
Id double - Project ID, default value is 0.
- Resource
Delete List<KubernetesOptions Cluster Resource Delete Option> - The resource deletion policy when the cluster is deleted. Currently, CBS is supported (CBS is retained by default). Only valid when deleting cluster.
- Runtime
Version string - Container Runtime version.
- Service
Cidr string - A network address block of the service. Different from vpc cidr and cidr of other clusters within this vpc. Must be in 10./192.168/172.[16-31] segments.
- Dictionary<string, string>
- The tags of the cluster.
- Unschedulable double
- Sets whether the joining node participates in the schedule. Default is '0'. Participate in scheduling.
- Upgrade
Instances boolFollow Cluster - Indicates whether upgrade all instances when cluster_version change. Default is false.
- Vpc
Cni stringType - Distinguish between shared network card multi-IP mode and independent network card mode. Fill in
tke-route-eni
for shared network card multi-IP mode andtke-direct-eni
for independent network card mode. The default is shared network card mode. When it is necessary to turn off the vpc-cni container network capability, botheni_subnet_ids
andvpc_cni_type
must be set to empty. - Worker
Configs List<KubernetesCluster Worker Config> - Deploy the machine configuration information of the 'WORKER' service, and create <=20 units for common users. The other 'WORK' service are added by 'tencentcloud_kubernetes_scale_worker'.
- Vpc
Id string - Vpc Id of the cluster.
- Acquire
Cluster boolAdmin Role - If set to true, it will acquire the ClusterRole tke:admin. NOTE: this arguments cannot revoke to
false
after acquired. - Auth
Options KubernetesCluster Auth Options Args - Specify cluster authentication configuration. Only available for managed cluster and
cluster_version
>= 1.20. - Auto
Upgrade boolCluster Level - Whether the cluster level auto upgraded, valid for managed cluster.
- Base
Pod float64Num - The number of basic pods. valid when enable_customized_pod_cidr=true.
- Cdc
Id string - CDC ID.
- Claim
Expired float64Seconds - Claim expired seconds to recycle ENI. This field can only set when field
network_type
is 'VPC-CNI'.claim_expired_seconds
must greater or equal than 300 and less than 15768000. - Cluster
Audit KubernetesCluster Cluster Audit Args - Specify Cluster Audit config. NOTE: Please make sure your TKE CamRole have permission to access CLS service.
- Cluster
Cidr string - A network address block of the cluster. Different from vpc cidr and cidr of other clusters within this vpc. Must be in 10./192.168/172.[16-31] segments.
- Cluster
Deploy stringType - Deployment type of the cluster, the available values include: 'MANAGED_CLUSTER' and 'INDEPENDENT_CLUSTER'. Default is 'MANAGED_CLUSTER'.
- Cluster
Desc string - Description of the cluster.
- Cluster
Extra KubernetesArgs Cluster Cluster Extra Args Args - Customized parameters for master component,such as kube-apiserver, kube-controller-manager, kube-scheduler.
- Cluster
Internet bool - Open internet access or not. If this field is set 'true', the field below
worker_config
must be set. Because only cluster with node is allowed enable access endpoint. You may open it throughtencentcloud.KubernetesClusterEndpoint
. - Cluster
Internet stringDomain - Domain name for cluster Kube-apiserver internet access. Be careful if you modify value of this parameter, the cluster_external_endpoint value may be changed automatically too.
- Cluster
Internet stringSecurity Group - Specify security group, NOTE: This argument must not be empty if cluster internet enabled.
- Cluster
Intranet bool - Open intranet access or not. If this field is set 'true', the field below
worker_config
must be set. Because only cluster with node is allowed enable access endpoint. You may open it throughtencentcloud.KubernetesClusterEndpoint
. - Cluster
Intranet stringDomain - Domain name for cluster Kube-apiserver intranet access. Be careful if you modify value of this parameter, the pgw_endpoint value may be changed automatically too.
- Cluster
Intranet stringSubnet Id - Subnet id who can access this independent cluster, this field must and can only set when
cluster_intranet
is true.cluster_intranet_subnet_id
can not modify once be set. - Cluster
Ipvs bool - Indicates whether
ipvs
is enabled. Default is true. False meansiptables
is enabled. - Cluster
Level string - Specify cluster level, valid for managed cluster, use data source
tencentcloud.getKubernetesClusterLevels
to query available levels. Available value examplesL5
,L20
,L50
,L100
, etc. - Cluster
Max float64Pod Num - The maximum number of Pods per node in the cluster. Default is 256. The minimum value is 4. When its power unequal to 2, it will round upward to the closest power of 2.
- Cluster
Max float64Service Num - The maximum number of services in the cluster. Default is 256. The range is from 32 to 32768. When its power unequal to 2, it will round upward to the closest power of 2.
- Cluster
Name string - Name of the cluster.
- Cluster
Os string - Cluster operating system, supports setting public images (the field passes the corresponding image Name) and custom images (the field passes the corresponding image ID). For details, please refer to: https://cloud.tencent.com/document/product/457/68289.
- Cluster
Os stringType - Image type of the cluster os, the available values include: 'GENERAL'. Default is 'GENERAL'.
- Cluster
Subnet stringId - Subnet ID of the cluster, such as: subnet-b3p7d7q5.
- Cluster
Version string - Version of the cluster. Use
tencentcloud.getKubernetesAvailableClusterVersions
to get the upgradable cluster version. - Container
Runtime string - Runtime type of the cluster, the available values include: 'docker' and 'containerd'.The Kubernetes v1.24 has removed dockershim, so please use containerd in v1.24 or higher.Default is 'docker'.
- Deletion
Protection bool - Indicates whether cluster deletion protection is enabled. Default is false.
- Docker
Graph stringPath - Docker graph path. Default is
/var/lib/docker
. - Enable
Customized boolPod Cidr - Whether to enable the custom mode of node podCIDR size. Default is false.
- Eni
Subnet []stringIds - Subnet Ids for cluster with VPC-CNI network mode. This field can only set when field
network_type
is 'VPC-CNI'.eni_subnet_ids
can not empty once be set. - Event
Persistence KubernetesCluster Event Persistence Args - Specify cluster Event Persistence config. NOTE: Please make sure your TKE CamRole have permission to access CLS service.
- Exist
Instances []KubernetesCluster Exist Instance Args - create tke cluster by existed instances.
- Extension
Addons []KubernetesCluster Extension Addon Args - Information of the add-on to be installed.
- Extra
Args []string - Custom parameter information related to the node.
- Globe
Desired float64Pod Num - Indicate to set desired pod number in node. valid when enable_customized_pod_cidr=true, and it takes effect for all nodes.
- Ignore
Cluster boolCidr Conflict - Indicates whether to ignore the cluster cidr conflict error. Default is false.
- Ignore
Service boolCidr Conflict - Indicates whether to ignore the service cidr conflict error. Only valid in
VPC-CNI
mode. - Instance
Delete stringMode - The strategy for deleting cluster instances: terminate (destroy instances, only support pay as you go cloud host instances) retain (remove only, keep instances), Default is terminate.
- Is
Non boolStatic Ip Mode - Indicates whether non-static ip mode is enabled. Default is false.
- Kube
Proxy stringMode - Cluster kube-proxy mode, the available values include: 'kube-proxy-bpf'. Default is not set.When set to kube-proxy-bpf, cluster version greater than 1.14 and with Tencent Linux 2.4 is required.
- Kubernetes
Cluster stringId - ID of the resource.
- Labels map[string]string
- Labels of tke cluster nodes.
- Log
Agent KubernetesCluster Log Agent Args - Specify cluster log agent config.
- Managed
Cluster []stringInternet Security Policies - this argument was deprecated, use
cluster_internet_security_group
instead. Security policies for managed cluster internet, like:'192.168.1.0/24' or '113.116.51.27', '0.0.0.0/0' means all. This field can only set when fieldcluster_deploy_type
is 'MANAGED_CLUSTER' andcluster_internet
is true.managed_cluster_internet_security_policies
can not delete or empty once be set. - Master
Configs []KubernetesCluster Master Config Args - Deploy the machine configuration information of the 'MASTER_ETCD' service, and create <=7 units for common users.
- Mount
Target string - Mount target. Default is not mounting.
- Network
Type string - Cluster network type, the available values include: 'GR' and 'VPC-CNI' and 'CiliumOverlay'. Default is GR.
- Node
Name stringType - Node name type of Cluster, the available values include: 'lan-ip' and 'hostname', Default is 'lan-ip'.
- Node
Pool []KubernetesGlobal Configs Cluster Node Pool Global Config Args - Global config effective for all node pools.
- Pre
Start stringUser Script - Base64-encoded user script, executed before initializing the node, currently only effective for adding existing nodes.
- Project
Id float64 - Project ID, default value is 0.
- Resource
Delete []KubernetesOptions Cluster Resource Delete Option Args - The resource deletion policy when the cluster is deleted. Currently, CBS is supported (CBS is retained by default). Only valid when deleting cluster.
- Runtime
Version string - Container Runtime version.
- Service
Cidr string - A network address block of the service. Different from vpc cidr and cidr of other clusters within this vpc. Must be in 10./192.168/172.[16-31] segments.
- map[string]string
- The tags of the cluster.
- Unschedulable float64
- Sets whether the joining node participates in the schedule. Default is '0'. Participate in scheduling.
- Upgrade
Instances boolFollow Cluster - Indicates whether upgrade all instances when cluster_version change. Default is false.
- Vpc
Cni stringType - Distinguish between shared network card multi-IP mode and independent network card mode. Fill in
tke-route-eni
for shared network card multi-IP mode andtke-direct-eni
for independent network card mode. The default is shared network card mode. When it is necessary to turn off the vpc-cni container network capability, botheni_subnet_ids
andvpc_cni_type
must be set to empty. - Worker
Configs []KubernetesCluster Worker Config Args - Deploy the machine configuration information of the 'WORKER' service, and create <=20 units for common users. The other 'WORK' service are added by 'tencentcloud_kubernetes_scale_worker'.
- vpc
Id String - Vpc Id of the cluster.
- acquire
Cluster BooleanAdmin Role - If set to true, it will acquire the ClusterRole tke:admin. NOTE: this arguments cannot revoke to
false
after acquired. - auth
Options KubernetesCluster Auth Options - Specify cluster authentication configuration. Only available for managed cluster and
cluster_version
>= 1.20. - auto
Upgrade BooleanCluster Level - Whether the cluster level auto upgraded, valid for managed cluster.
- base
Pod DoubleNum - The number of basic pods. valid when enable_customized_pod_cidr=true.
- cdc
Id String - CDC ID.
- claim
Expired DoubleSeconds - Claim expired seconds to recycle ENI. This field can only set when field
network_type
is 'VPC-CNI'.claim_expired_seconds
must greater or equal than 300 and less than 15768000. - cluster
Audit KubernetesCluster Cluster Audit - Specify Cluster Audit config. NOTE: Please make sure your TKE CamRole have permission to access CLS service.
- cluster
Cidr String - A network address block of the cluster. Different from vpc cidr and cidr of other clusters within this vpc. Must be in 10./192.168/172.[16-31] segments.
- cluster
Deploy StringType - Deployment type of the cluster, the available values include: 'MANAGED_CLUSTER' and 'INDEPENDENT_CLUSTER'. Default is 'MANAGED_CLUSTER'.
- cluster
Desc String - Description of the cluster.
- cluster
Extra KubernetesArgs Cluster Cluster Extra Args - Customized parameters for master component,such as kube-apiserver, kube-controller-manager, kube-scheduler.
- cluster
Internet Boolean - Open internet access or not. If this field is set 'true', the field below
worker_config
must be set. Because only cluster with node is allowed enable access endpoint. You may open it throughtencentcloud.KubernetesClusterEndpoint
. - cluster
Internet StringDomain - Domain name for cluster Kube-apiserver internet access. Be careful if you modify value of this parameter, the cluster_external_endpoint value may be changed automatically too.
- cluster
Internet StringSecurity Group - Specify security group, NOTE: This argument must not be empty if cluster internet enabled.
- cluster
Intranet Boolean - Open intranet access or not. If this field is set 'true', the field below
worker_config
must be set. Because only cluster with node is allowed enable access endpoint. You may open it throughtencentcloud.KubernetesClusterEndpoint
. - cluster
Intranet StringDomain - Domain name for cluster Kube-apiserver intranet access. Be careful if you modify value of this parameter, the pgw_endpoint value may be changed automatically too.
- cluster
Intranet StringSubnet Id - Subnet id who can access this independent cluster, this field must and can only set when
cluster_intranet
is true.cluster_intranet_subnet_id
can not modify once be set. - cluster
Ipvs Boolean - Indicates whether
ipvs
is enabled. Default is true. False meansiptables
is enabled. - cluster
Level String - Specify cluster level, valid for managed cluster, use data source
tencentcloud.getKubernetesClusterLevels
to query available levels. Available value examplesL5
,L20
,L50
,L100
, etc. - cluster
Max DoublePod Num - The maximum number of Pods per node in the cluster. Default is 256. The minimum value is 4. When its power unequal to 2, it will round upward to the closest power of 2.
- cluster
Max DoubleService Num - The maximum number of services in the cluster. Default is 256. The range is from 32 to 32768. When its power unequal to 2, it will round upward to the closest power of 2.
- cluster
Name String - Name of the cluster.
- cluster
Os String - Cluster operating system, supports setting public images (the field passes the corresponding image Name) and custom images (the field passes the corresponding image ID). For details, please refer to: https://cloud.tencent.com/document/product/457/68289.
- cluster
Os StringType - Image type of the cluster os, the available values include: 'GENERAL'. Default is 'GENERAL'.
- cluster
Subnet StringId - Subnet ID of the cluster, such as: subnet-b3p7d7q5.
- cluster
Version String - Version of the cluster. Use
tencentcloud.getKubernetesAvailableClusterVersions
to get the upgradable cluster version. - container
Runtime String - Runtime type of the cluster, the available values include: 'docker' and 'containerd'.The Kubernetes v1.24 has removed dockershim, so please use containerd in v1.24 or higher.Default is 'docker'.
- deletion
Protection Boolean - Indicates whether cluster deletion protection is enabled. Default is false.
- docker
Graph StringPath - Docker graph path. Default is
/var/lib/docker
. - enable
Customized BooleanPod Cidr - Whether to enable the custom mode of node podCIDR size. Default is false.
- eni
Subnet List<String>Ids - Subnet Ids for cluster with VPC-CNI network mode. This field can only set when field
network_type
is 'VPC-CNI'.eni_subnet_ids
can not empty once be set. - event
Persistence KubernetesCluster Event Persistence - Specify cluster Event Persistence config. NOTE: Please make sure your TKE CamRole have permission to access CLS service.
- exist
Instances List<KubernetesCluster Exist Instance> - create tke cluster by existed instances.
- extension
Addons List<KubernetesCluster Extension Addon> - Information of the add-on to be installed.
- extra
Args List<String> - Custom parameter information related to the node.
- globe
Desired DoublePod Num - Indicate to set desired pod number in node. valid when enable_customized_pod_cidr=true, and it takes effect for all nodes.
- ignore
Cluster BooleanCidr Conflict - Indicates whether to ignore the cluster cidr conflict error. Default is false.
- ignore
Service BooleanCidr Conflict - Indicates whether to ignore the service cidr conflict error. Only valid in
VPC-CNI
mode. - instance
Delete StringMode - The strategy for deleting cluster instances: terminate (destroy instances, only support pay as you go cloud host instances) retain (remove only, keep instances), Default is terminate.
- is
Non BooleanStatic Ip Mode - Indicates whether non-static ip mode is enabled. Default is false.
- kube
Proxy StringMode - Cluster kube-proxy mode, the available values include: 'kube-proxy-bpf'. Default is not set.When set to kube-proxy-bpf, cluster version greater than 1.14 and with Tencent Linux 2.4 is required.
- kubernetes
Cluster StringId - ID of the resource.
- labels Map<String,String>
- Labels of tke cluster nodes.
- log
Agent KubernetesCluster Log Agent - Specify cluster log agent config.
- managed
Cluster List<String>Internet Security Policies - this argument was deprecated, use
cluster_internet_security_group
instead. Security policies for managed cluster internet, like:'192.168.1.0/24' or '113.116.51.27', '0.0.0.0/0' means all. This field can only set when fieldcluster_deploy_type
is 'MANAGED_CLUSTER' andcluster_internet
is true.managed_cluster_internet_security_policies
can not delete or empty once be set. - master
Configs List<KubernetesCluster Master Config> - Deploy the machine configuration information of the 'MASTER_ETCD' service, and create <=7 units for common users.
- mount
Target String - Mount target. Default is not mounting.
- network
Type String - Cluster network type, the available values include: 'GR' and 'VPC-CNI' and 'CiliumOverlay'. Default is GR.
- node
Name StringType - Node name type of Cluster, the available values include: 'lan-ip' and 'hostname', Default is 'lan-ip'.
- node
Pool List<KubernetesGlobal Configs Cluster Node Pool Global Config> - Global config effective for all node pools.
- pre
Start StringUser Script - Base64-encoded user script, executed before initializing the node, currently only effective for adding existing nodes.
- project
Id Double - Project ID, default value is 0.
- resource
Delete List<KubernetesOptions Cluster Resource Delete Option> - The resource deletion policy when the cluster is deleted. Currently, CBS is supported (CBS is retained by default). Only valid when deleting cluster.
- runtime
Version String - Container Runtime version.
- service
Cidr String - A network address block of the service. Different from vpc cidr and cidr of other clusters within this vpc. Must be in 10./192.168/172.[16-31] segments.
- Map<String,String>
- The tags of the cluster.
- unschedulable Double
- Sets whether the joining node participates in the schedule. Default is '0'. Participate in scheduling.
- upgrade
Instances BooleanFollow Cluster - Indicates whether upgrade all instances when cluster_version change. Default is false.
- vpc
Cni StringType - Distinguish between shared network card multi-IP mode and independent network card mode. Fill in
tke-route-eni
for shared network card multi-IP mode andtke-direct-eni
for independent network card mode. The default is shared network card mode. When it is necessary to turn off the vpc-cni container network capability, botheni_subnet_ids
andvpc_cni_type
must be set to empty. - worker
Configs List<KubernetesCluster Worker Config> - Deploy the machine configuration information of the 'WORKER' service, and create <=20 units for common users. The other 'WORK' service are added by 'tencentcloud_kubernetes_scale_worker'.
- vpc
Id string - Vpc Id of the cluster.
- acquire
Cluster booleanAdmin Role - If set to true, it will acquire the ClusterRole tke:admin. NOTE: this arguments cannot revoke to
false
after acquired. - auth
Options KubernetesCluster Auth Options - Specify cluster authentication configuration. Only available for managed cluster and
cluster_version
>= 1.20. - auto
Upgrade booleanCluster Level - Whether the cluster level auto upgraded, valid for managed cluster.
- base
Pod numberNum - The number of basic pods. valid when enable_customized_pod_cidr=true.
- cdc
Id string - CDC ID.
- claim
Expired numberSeconds - Claim expired seconds to recycle ENI. This field can only set when field
network_type
is 'VPC-CNI'.claim_expired_seconds
must greater or equal than 300 and less than 15768000. - cluster
Audit KubernetesCluster Cluster Audit - Specify Cluster Audit config. NOTE: Please make sure your TKE CamRole have permission to access CLS service.
- cluster
Cidr string - A network address block of the cluster. Different from vpc cidr and cidr of other clusters within this vpc. Must be in 10./192.168/172.[16-31] segments.
- cluster
Deploy stringType - Deployment type of the cluster, the available values include: 'MANAGED_CLUSTER' and 'INDEPENDENT_CLUSTER'. Default is 'MANAGED_CLUSTER'.
- cluster
Desc string - Description of the cluster.
- cluster
Extra KubernetesArgs Cluster Cluster Extra Args - Customized parameters for master component,such as kube-apiserver, kube-controller-manager, kube-scheduler.
- cluster
Internet boolean - Open internet access or not. If this field is set 'true', the field below
worker_config
must be set. Because only cluster with node is allowed enable access endpoint. You may open it throughtencentcloud.KubernetesClusterEndpoint
. - cluster
Internet stringDomain - Domain name for cluster Kube-apiserver internet access. Be careful if you modify value of this parameter, the cluster_external_endpoint value may be changed automatically too.
- cluster
Internet stringSecurity Group - Specify security group, NOTE: This argument must not be empty if cluster internet enabled.
- cluster
Intranet boolean - Open intranet access or not. If this field is set 'true', the field below
worker_config
must be set. Because only cluster with node is allowed enable access endpoint. You may open it throughtencentcloud.KubernetesClusterEndpoint
. - cluster
Intranet stringDomain - Domain name for cluster Kube-apiserver intranet access. Be careful if you modify value of this parameter, the pgw_endpoint value may be changed automatically too.
- cluster
Intranet stringSubnet Id - Subnet id who can access this independent cluster, this field must and can only set when
cluster_intranet
is true.cluster_intranet_subnet_id
can not modify once be set. - cluster
Ipvs boolean - Indicates whether
ipvs
is enabled. Default is true. False meansiptables
is enabled. - cluster
Level string - Specify cluster level, valid for managed cluster, use data source
tencentcloud.getKubernetesClusterLevels
to query available levels. Available value examplesL5
,L20
,L50
,L100
, etc. - cluster
Max numberPod Num - The maximum number of Pods per node in the cluster. Default is 256. The minimum value is 4. When its power unequal to 2, it will round upward to the closest power of 2.
- cluster
Max numberService Num - The maximum number of services in the cluster. Default is 256. The range is from 32 to 32768. When its power unequal to 2, it will round upward to the closest power of 2.
- cluster
Name string - Name of the cluster.
- cluster
Os string - Cluster operating system, supports setting public images (the field passes the corresponding image Name) and custom images (the field passes the corresponding image ID). For details, please refer to: https://cloud.tencent.com/document/product/457/68289.
- cluster
Os stringType - Image type of the cluster os, the available values include: 'GENERAL'. Default is 'GENERAL'.
- cluster
Subnet stringId - Subnet ID of the cluster, such as: subnet-b3p7d7q5.
- cluster
Version string - Version of the cluster. Use
tencentcloud.getKubernetesAvailableClusterVersions
to get the upgradable cluster version. - container
Runtime string - Runtime type of the cluster, the available values include: 'docker' and 'containerd'.The Kubernetes v1.24 has removed dockershim, so please use containerd in v1.24 or higher.Default is 'docker'.
- deletion
Protection boolean - Indicates whether cluster deletion protection is enabled. Default is false.
- docker
Graph stringPath - Docker graph path. Default is
/var/lib/docker
. - enable
Customized booleanPod Cidr - Whether to enable the custom mode of node podCIDR size. Default is false.
- eni
Subnet string[]Ids - Subnet Ids for cluster with VPC-CNI network mode. This field can only set when field
network_type
is 'VPC-CNI'.eni_subnet_ids
can not empty once be set. - event
Persistence KubernetesCluster Event Persistence - Specify cluster Event Persistence config. NOTE: Please make sure your TKE CamRole have permission to access CLS service.
- exist
Instances KubernetesCluster Exist Instance[] - create tke cluster by existed instances.
- extension
Addons KubernetesCluster Extension Addon[] - Information of the add-on to be installed.
- extra
Args string[] - Custom parameter information related to the node.
- globe
Desired numberPod Num - Indicate to set desired pod number in node. valid when enable_customized_pod_cidr=true, and it takes effect for all nodes.
- ignore
Cluster booleanCidr Conflict - Indicates whether to ignore the cluster cidr conflict error. Default is false.
- ignore
Service booleanCidr Conflict - Indicates whether to ignore the service cidr conflict error. Only valid in
VPC-CNI
mode. - instance
Delete stringMode - The strategy for deleting cluster instances: terminate (destroy instances, only support pay as you go cloud host instances) retain (remove only, keep instances), Default is terminate.
- is
Non booleanStatic Ip Mode - Indicates whether non-static ip mode is enabled. Default is false.
- kube
Proxy stringMode - Cluster kube-proxy mode, the available values include: 'kube-proxy-bpf'. Default is not set.When set to kube-proxy-bpf, cluster version greater than 1.14 and with Tencent Linux 2.4 is required.
- kubernetes
Cluster stringId - ID of the resource.
- labels {[key: string]: string}
- Labels of tke cluster nodes.
- log
Agent KubernetesCluster Log Agent - Specify cluster log agent config.
- managed
Cluster string[]Internet Security Policies - this argument was deprecated, use
cluster_internet_security_group
instead. Security policies for managed cluster internet, like:'192.168.1.0/24' or '113.116.51.27', '0.0.0.0/0' means all. This field can only set when fieldcluster_deploy_type
is 'MANAGED_CLUSTER' andcluster_internet
is true.managed_cluster_internet_security_policies
can not delete or empty once be set. - master
Configs KubernetesCluster Master Config[] - Deploy the machine configuration information of the 'MASTER_ETCD' service, and create <=7 units for common users.
- mount
Target string - Mount target. Default is not mounting.
- network
Type string - Cluster network type, the available values include: 'GR' and 'VPC-CNI' and 'CiliumOverlay'. Default is GR.
- node
Name stringType - Node name type of Cluster, the available values include: 'lan-ip' and 'hostname', Default is 'lan-ip'.
- node
Pool KubernetesGlobal Configs Cluster Node Pool Global Config[] - Global config effective for all node pools.
- pre
Start stringUser Script - Base64-encoded user script, executed before initializing the node, currently only effective for adding existing nodes.
- project
Id number - Project ID, default value is 0.
- resource
Delete KubernetesOptions Cluster Resource Delete Option[] - The resource deletion policy when the cluster is deleted. Currently, CBS is supported (CBS is retained by default). Only valid when deleting cluster.
- runtime
Version string - Container Runtime version.
- service
Cidr string - A network address block of the service. Different from vpc cidr and cidr of other clusters within this vpc. Must be in 10./192.168/172.[16-31] segments.
- {[key: string]: string}
- The tags of the cluster.
- unschedulable number
- Sets whether the joining node participates in the schedule. Default is '0'. Participate in scheduling.
- upgrade
Instances booleanFollow Cluster - Indicates whether upgrade all instances when cluster_version change. Default is false.
- vpc
Cni stringType - Distinguish between shared network card multi-IP mode and independent network card mode. Fill in
tke-route-eni
for shared network card multi-IP mode andtke-direct-eni
for independent network card mode. The default is shared network card mode. When it is necessary to turn off the vpc-cni container network capability, botheni_subnet_ids
andvpc_cni_type
must be set to empty. - worker
Configs KubernetesCluster Worker Config[] - Deploy the machine configuration information of the 'WORKER' service, and create <=20 units for common users. The other 'WORK' service are added by 'tencentcloud_kubernetes_scale_worker'.
- vpc_
id str - Vpc Id of the cluster.
- acquire_
cluster_ booladmin_ role - If set to true, it will acquire the ClusterRole tke:admin. NOTE: this arguments cannot revoke to
false
after acquired. - auth_
options KubernetesCluster Auth Options Args - Specify cluster authentication configuration. Only available for managed cluster and
cluster_version
>= 1.20. - auto_
upgrade_ boolcluster_ level - Whether the cluster level auto upgraded, valid for managed cluster.
- base_
pod_ floatnum - The number of basic pods. valid when enable_customized_pod_cidr=true.
- cdc_
id str - CDC ID.
- claim_
expired_ floatseconds - Claim expired seconds to recycle ENI. This field can only set when field
network_type
is 'VPC-CNI'.claim_expired_seconds
must greater or equal than 300 and less than 15768000. - cluster_
audit KubernetesCluster Cluster Audit Args - Specify Cluster Audit config. NOTE: Please make sure your TKE CamRole have permission to access CLS service.
- cluster_
cidr str - A network address block of the cluster. Different from vpc cidr and cidr of other clusters within this vpc. Must be in 10./192.168/172.[16-31] segments.
- cluster_
deploy_ strtype - Deployment type of the cluster, the available values include: 'MANAGED_CLUSTER' and 'INDEPENDENT_CLUSTER'. Default is 'MANAGED_CLUSTER'.
- cluster_
desc str - Description of the cluster.
- cluster_
extra_ Kubernetesargs Cluster Cluster Extra Args Args - Customized parameters for master component,such as kube-apiserver, kube-controller-manager, kube-scheduler.
- cluster_
internet bool - Open internet access or not. If this field is set 'true', the field below
worker_config
must be set. Because only cluster with node is allowed enable access endpoint. You may open it throughtencentcloud.KubernetesClusterEndpoint
. - cluster_
internet_ strdomain - Domain name for cluster Kube-apiserver internet access. Be careful if you modify value of this parameter, the cluster_external_endpoint value may be changed automatically too.
- cluster_
internet_ strsecurity_ group - Specify security group, NOTE: This argument must not be empty if cluster internet enabled.
- cluster_
intranet bool - Open intranet access or not. If this field is set 'true', the field below
worker_config
must be set. Because only cluster with node is allowed enable access endpoint. You may open it throughtencentcloud.KubernetesClusterEndpoint
. - cluster_
intranet_ strdomain - Domain name for cluster Kube-apiserver intranet access. Be careful if you modify value of this parameter, the pgw_endpoint value may be changed automatically too.
- cluster_
intranet_ strsubnet_ id - Subnet id who can access this independent cluster, this field must and can only set when
cluster_intranet
is true.cluster_intranet_subnet_id
can not modify once be set. - cluster_
ipvs bool - Indicates whether
ipvs
is enabled. Default is true. False meansiptables
is enabled. - cluster_
level str - Specify cluster level, valid for managed cluster, use data source
tencentcloud.getKubernetesClusterLevels
to query available levels. Available value examplesL5
,L20
,L50
,L100
, etc. - cluster_
max_ floatpod_ num - The maximum number of Pods per node in the cluster. Default is 256. The minimum value is 4. When its power unequal to 2, it will round upward to the closest power of 2.
- cluster_
max_ floatservice_ num - The maximum number of services in the cluster. Default is 256. The range is from 32 to 32768. When its power unequal to 2, it will round upward to the closest power of 2.
- cluster_
name str - Name of the cluster.
- cluster_
os str - Cluster operating system, supports setting public images (the field passes the corresponding image Name) and custom images (the field passes the corresponding image ID). For details, please refer to: https://cloud.tencent.com/document/product/457/68289.
- cluster_
os_ strtype - Image type of the cluster os, the available values include: 'GENERAL'. Default is 'GENERAL'.
- cluster_
subnet_ strid - Subnet ID of the cluster, such as: subnet-b3p7d7q5.
- cluster_
version str - Version of the cluster. Use
tencentcloud.getKubernetesAvailableClusterVersions
to get the upgradable cluster version. - container_
runtime str - Runtime type of the cluster, the available values include: 'docker' and 'containerd'.The Kubernetes v1.24 has removed dockershim, so please use containerd in v1.24 or higher.Default is 'docker'.
- deletion_
protection bool - Indicates whether cluster deletion protection is enabled. Default is false.
- docker_
graph_ strpath - Docker graph path. Default is
/var/lib/docker
. - enable_
customized_ boolpod_ cidr - Whether to enable the custom mode of node podCIDR size. Default is false.
- eni_
subnet_ Sequence[str]ids - Subnet Ids for cluster with VPC-CNI network mode. This field can only set when field
network_type
is 'VPC-CNI'.eni_subnet_ids
can not empty once be set. - event_
persistence KubernetesCluster Event Persistence Args - Specify cluster Event Persistence config. NOTE: Please make sure your TKE CamRole have permission to access CLS service.
- exist_
instances Sequence[KubernetesCluster Exist Instance Args] - create tke cluster by existed instances.
- extension_
addons Sequence[KubernetesCluster Extension Addon Args] - Information of the add-on to be installed.
- extra_
args Sequence[str] - Custom parameter information related to the node.
- globe_
desired_ floatpod_ num - Indicate to set desired pod number in node. valid when enable_customized_pod_cidr=true, and it takes effect for all nodes.
- ignore_
cluster_ boolcidr_ conflict - Indicates whether to ignore the cluster cidr conflict error. Default is false.
- ignore_
service_ boolcidr_ conflict - Indicates whether to ignore the service cidr conflict error. Only valid in
VPC-CNI
mode. - instance_
delete_ strmode - The strategy for deleting cluster instances: terminate (destroy instances, only support pay as you go cloud host instances) retain (remove only, keep instances), Default is terminate.
- is_
non_ boolstatic_ ip_ mode - Indicates whether non-static ip mode is enabled. Default is false.
- kube_
proxy_ strmode - Cluster kube-proxy mode, the available values include: 'kube-proxy-bpf'. Default is not set.When set to kube-proxy-bpf, cluster version greater than 1.14 and with Tencent Linux 2.4 is required.
- kubernetes_
cluster_ strid - ID of the resource.
- labels Mapping[str, str]
- Labels of tke cluster nodes.
- log_
agent KubernetesCluster Log Agent Args - Specify cluster log agent config.
- managed_
cluster_ Sequence[str]internet_ security_ policies - this argument was deprecated, use
cluster_internet_security_group
instead. Security policies for managed cluster internet, like:'192.168.1.0/24' or '113.116.51.27', '0.0.0.0/0' means all. This field can only set when fieldcluster_deploy_type
is 'MANAGED_CLUSTER' andcluster_internet
is true.managed_cluster_internet_security_policies
can not delete or empty once be set. - master_
configs Sequence[KubernetesCluster Master Config Args] - Deploy the machine configuration information of the 'MASTER_ETCD' service, and create <=7 units for common users.
- mount_
target str - Mount target. Default is not mounting.
- network_
type str - Cluster network type, the available values include: 'GR' and 'VPC-CNI' and 'CiliumOverlay'. Default is GR.
- node_
name_ strtype - Node name type of Cluster, the available values include: 'lan-ip' and 'hostname', Default is 'lan-ip'.
- node_
pool_ Sequence[Kubernetesglobal_ configs Cluster Node Pool Global Config Args] - Global config effective for all node pools.
- pre_
start_ struser_ script - Base64-encoded user script, executed before initializing the node, currently only effective for adding existing nodes.
- project_
id float - Project ID, default value is 0.
- resource_
delete_ Sequence[Kubernetesoptions Cluster Resource Delete Option Args] - The resource deletion policy when the cluster is deleted. Currently, CBS is supported (CBS is retained by default). Only valid when deleting cluster.
- runtime_
version str - Container Runtime version.
- service_
cidr str - A network address block of the service. Different from vpc cidr and cidr of other clusters within this vpc. Must be in 10./192.168/172.[16-31] segments.
- Mapping[str, str]
- The tags of the cluster.
- unschedulable float
- Sets whether the joining node participates in the schedule. Default is '0'. Participate in scheduling.
- upgrade_
instances_ boolfollow_ cluster - Indicates whether upgrade all instances when cluster_version change. Default is false.
- vpc_
cni_ strtype - Distinguish between shared network card multi-IP mode and independent network card mode. Fill in
tke-route-eni
for shared network card multi-IP mode andtke-direct-eni
for independent network card mode. The default is shared network card mode. When it is necessary to turn off the vpc-cni container network capability, botheni_subnet_ids
andvpc_cni_type
must be set to empty. - worker_
configs Sequence[KubernetesCluster Worker Config Args] - Deploy the machine configuration information of the 'WORKER' service, and create <=20 units for common users. The other 'WORK' service are added by 'tencentcloud_kubernetes_scale_worker'.
- vpc
Id String - Vpc Id of the cluster.
- acquire
Cluster BooleanAdmin Role - If set to true, it will acquire the ClusterRole tke:admin. NOTE: this arguments cannot revoke to
false
after acquired. - auth
Options Property Map - Specify cluster authentication configuration. Only available for managed cluster and
cluster_version
>= 1.20. - auto
Upgrade BooleanCluster Level - Whether the cluster level auto upgraded, valid for managed cluster.
- base
Pod NumberNum - The number of basic pods. valid when enable_customized_pod_cidr=true.
- cdc
Id String - CDC ID.
- claim
Expired NumberSeconds - Claim expired seconds to recycle ENI. This field can only set when field
network_type
is 'VPC-CNI'.claim_expired_seconds
must greater or equal than 300 and less than 15768000. - cluster
Audit Property Map - Specify Cluster Audit config. NOTE: Please make sure your TKE CamRole have permission to access CLS service.
- cluster
Cidr String - A network address block of the cluster. Different from vpc cidr and cidr of other clusters within this vpc. Must be in 10./192.168/172.[16-31] segments.
- cluster
Deploy StringType - Deployment type of the cluster, the available values include: 'MANAGED_CLUSTER' and 'INDEPENDENT_CLUSTER'. Default is 'MANAGED_CLUSTER'.
- cluster
Desc String - Description of the cluster.
- cluster
Extra Property MapArgs - Customized parameters for master component,such as kube-apiserver, kube-controller-manager, kube-scheduler.
- cluster
Internet Boolean - Open internet access or not. If this field is set 'true', the field below
worker_config
must be set. Because only cluster with node is allowed enable access endpoint. You may open it throughtencentcloud.KubernetesClusterEndpoint
. - cluster
Internet StringDomain - Domain name for cluster Kube-apiserver internet access. Be careful if you modify value of this parameter, the cluster_external_endpoint value may be changed automatically too.
- cluster
Internet StringSecurity Group - Specify security group, NOTE: This argument must not be empty if cluster internet enabled.
- cluster
Intranet Boolean - Open intranet access or not. If this field is set 'true', the field below
worker_config
must be set. Because only cluster with node is allowed enable access endpoint. You may open it throughtencentcloud.KubernetesClusterEndpoint
. - cluster
Intranet StringDomain - Domain name for cluster Kube-apiserver intranet access. Be careful if you modify value of this parameter, the pgw_endpoint value may be changed automatically too.
- cluster
Intranet StringSubnet Id - Subnet id who can access this independent cluster, this field must and can only set when
cluster_intranet
is true.cluster_intranet_subnet_id
can not modify once be set. - cluster
Ipvs Boolean - Indicates whether
ipvs
is enabled. Default is true. False meansiptables
is enabled. - cluster
Level String - Specify cluster level, valid for managed cluster, use data source
tencentcloud.getKubernetesClusterLevels
to query available levels. Available value examplesL5
,L20
,L50
,L100
, etc. - cluster
Max NumberPod Num - The maximum number of Pods per node in the cluster. Default is 256. The minimum value is 4. When its power unequal to 2, it will round upward to the closest power of 2.
- cluster
Max NumberService Num - The maximum number of services in the cluster. Default is 256. The range is from 32 to 32768. When its power unequal to 2, it will round upward to the closest power of 2.
- cluster
Name String - Name of the cluster.
- cluster
Os String - Cluster operating system, supports setting public images (the field passes the corresponding image Name) and custom images (the field passes the corresponding image ID). For details, please refer to: https://cloud.tencent.com/document/product/457/68289.
- cluster
Os StringType - Image type of the cluster os, the available values include: 'GENERAL'. Default is 'GENERAL'.
- cluster
Subnet StringId - Subnet ID of the cluster, such as: subnet-b3p7d7q5.
- cluster
Version String - Version of the cluster. Use
tencentcloud.getKubernetesAvailableClusterVersions
to get the upgradable cluster version. - container
Runtime String - Runtime type of the cluster, the available values include: 'docker' and 'containerd'.The Kubernetes v1.24 has removed dockershim, so please use containerd in v1.24 or higher.Default is 'docker'.
- deletion
Protection Boolean - Indicates whether cluster deletion protection is enabled. Default is false.
- docker
Graph StringPath - Docker graph path. Default is
/var/lib/docker
. - enable
Customized BooleanPod Cidr - Whether to enable the custom mode of node podCIDR size. Default is false.
- eni
Subnet List<String>Ids - Subnet Ids for cluster with VPC-CNI network mode. This field can only set when field
network_type
is 'VPC-CNI'.eni_subnet_ids
can not empty once be set. - event
Persistence Property Map - Specify cluster Event Persistence config. NOTE: Please make sure your TKE CamRole have permission to access CLS service.
- exist
Instances List<Property Map> - create tke cluster by existed instances.
- extension
Addons List<Property Map> - Information of the add-on to be installed.
- extra
Args List<String> - Custom parameter information related to the node.
- globe
Desired NumberPod Num - Indicate to set desired pod number in node. valid when enable_customized_pod_cidr=true, and it takes effect for all nodes.
- ignore
Cluster BooleanCidr Conflict - Indicates whether to ignore the cluster cidr conflict error. Default is false.
- ignore
Service BooleanCidr Conflict - Indicates whether to ignore the service cidr conflict error. Only valid in
VPC-CNI
mode. - instance
Delete StringMode - The strategy for deleting cluster instances: terminate (destroy instances, only support pay as you go cloud host instances) retain (remove only, keep instances), Default is terminate.
- is
Non BooleanStatic Ip Mode - Indicates whether non-static ip mode is enabled. Default is false.
- kube
Proxy StringMode - Cluster kube-proxy mode, the available values include: 'kube-proxy-bpf'. Default is not set.When set to kube-proxy-bpf, cluster version greater than 1.14 and with Tencent Linux 2.4 is required.
- kubernetes
Cluster StringId - ID of the resource.
- labels Map<String>
- Labels of tke cluster nodes.
- log
Agent Property Map - Specify cluster log agent config.
- managed
Cluster List<String>Internet Security Policies - this argument was deprecated, use
cluster_internet_security_group
instead. Security policies for managed cluster internet, like:'192.168.1.0/24' or '113.116.51.27', '0.0.0.0/0' means all. This field can only set when fieldcluster_deploy_type
is 'MANAGED_CLUSTER' andcluster_internet
is true.managed_cluster_internet_security_policies
can not delete or empty once be set. - master
Configs List<Property Map> - Deploy the machine configuration information of the 'MASTER_ETCD' service, and create <=7 units for common users.
- mount
Target String - Mount target. Default is not mounting.
- network
Type String - Cluster network type, the available values include: 'GR' and 'VPC-CNI' and 'CiliumOverlay'. Default is GR.
- node
Name StringType - Node name type of Cluster, the available values include: 'lan-ip' and 'hostname', Default is 'lan-ip'.
- node
Pool List<Property Map>Global Configs - Global config effective for all node pools.
- pre
Start StringUser Script - Base64-encoded user script, executed before initializing the node, currently only effective for adding existing nodes.
- project
Id Number - Project ID, default value is 0.
- resource
Delete List<Property Map>Options - The resource deletion policy when the cluster is deleted. Currently, CBS is supported (CBS is retained by default). Only valid when deleting cluster.
- runtime
Version String - Container Runtime version.
- service
Cidr String - A network address block of the service. Different from vpc cidr and cidr of other clusters within this vpc. Must be in 10./192.168/172.[16-31] segments.
- Map<String>
- The tags of the cluster.
- unschedulable Number
- Sets whether the joining node participates in the schedule. Default is '0'. Participate in scheduling.
- upgrade
Instances BooleanFollow Cluster - Indicates whether upgrade all instances when cluster_version change. Default is false.
- vpc
Cni StringType - Distinguish between shared network card multi-IP mode and independent network card mode. Fill in
tke-route-eni
for shared network card multi-IP mode andtke-direct-eni
for independent network card mode. The default is shared network card mode. When it is necessary to turn off the vpc-cni container network capability, botheni_subnet_ids
andvpc_cni_type
must be set to empty. - worker
Configs List<Property Map> - Deploy the machine configuration information of the 'WORKER' service, and create <=20 units for common users. The other 'WORK' service are added by 'tencentcloud_kubernetes_scale_worker'.
Outputs
All input properties are implicitly available as output properties. Additionally, the KubernetesCluster resource produces the following output properties:
- string
- The certificate used for access.
- Cluster
As boolEnabled - (Deprecated) This argument is deprecated because the TKE auto-scaling group was no longer available. Indicates whether to enable cluster node auto scaling. Default is false.
- Cluster
External stringEndpoint - External network address to access.
- Cluster
Node doubleNum - Number of nodes in the cluster.
- Domain string
- Domain name for access.
- Id string
- The provider-assigned unique ID for this managed resource.
- Kube
Config string - Kubernetes config.
- Kube
Config stringIntranet - Kubernetes config of private network.
- Password string
- Password of account.
- Pgw
Endpoint string - The Intranet address used for access.
- Security
Policies List<string> - Access policy.
- User
Name string - User name of account.
- Worker
Instances List<KubernetesLists Cluster Worker Instances List> - An information list of cvm within the 'WORKER' clusters. Each element contains the following attributes:
- string
- The certificate used for access.
- Cluster
As boolEnabled - (Deprecated) This argument is deprecated because the TKE auto-scaling group was no longer available. Indicates whether to enable cluster node auto scaling. Default is false.
- Cluster
External stringEndpoint - External network address to access.
- Cluster
Node float64Num - Number of nodes in the cluster.
- Domain string
- Domain name for access.
- Id string
- The provider-assigned unique ID for this managed resource.
- Kube
Config string - Kubernetes config.
- Kube
Config stringIntranet - Kubernetes config of private network.
- Password string
- Password of account.
- Pgw
Endpoint string - The Intranet address used for access.
- Security
Policies []string - Access policy.
- User
Name string - User name of account.
- Worker
Instances []KubernetesLists Cluster Worker Instances List - An information list of cvm within the 'WORKER' clusters. Each element contains the following attributes:
- String
- The certificate used for access.
- cluster
As BooleanEnabled - (Deprecated) This argument is deprecated because the TKE auto-scaling group was no longer available. Indicates whether to enable cluster node auto scaling. Default is false.
- cluster
External StringEndpoint - External network address to access.
- cluster
Node DoubleNum - Number of nodes in the cluster.
- domain String
- Domain name for access.
- id String
- The provider-assigned unique ID for this managed resource.
- kube
Config String - Kubernetes config.
- kube
Config StringIntranet - Kubernetes config of private network.
- password String
- Password of account.
- pgw
Endpoint String - The Intranet address used for access.
- security
Policies List<String> - Access policy.
- user
Name String - User name of account.
- worker
Instances List<KubernetesLists Cluster Worker Instances List> - An information list of cvm within the 'WORKER' clusters. Each element contains the following attributes:
- string
- The certificate used for access.
- cluster
As booleanEnabled - (Deprecated) This argument is deprecated because the TKE auto-scaling group was no longer available. Indicates whether to enable cluster node auto scaling. Default is false.
- cluster
External stringEndpoint - External network address to access.
- cluster
Node numberNum - Number of nodes in the cluster.
- domain string
- Domain name for access.
- id string
- The provider-assigned unique ID for this managed resource.
- kube
Config string - Kubernetes config.
- kube
Config stringIntranet - Kubernetes config of private network.
- password string
- Password of account.
- pgw
Endpoint string - The Intranet address used for access.
- security
Policies string[] - Access policy.
- user
Name string - User name of account.
- worker
Instances KubernetesLists Cluster Worker Instances List[] - An information list of cvm within the 'WORKER' clusters. Each element contains the following attributes:
- str
- The certificate used for access.
- cluster_
as_ boolenabled - (Deprecated) This argument is deprecated because the TKE auto-scaling group was no longer available. Indicates whether to enable cluster node auto scaling. Default is false.
- cluster_
external_ strendpoint - External network address to access.
- cluster_
node_ floatnum - Number of nodes in the cluster.
- domain str
- Domain name for access.
- id str
- The provider-assigned unique ID for this managed resource.
- kube_
config str - Kubernetes config.
- kube_
config_ strintranet - Kubernetes config of private network.
- password str
- Password of account.
- pgw_
endpoint str - The Intranet address used for access.
- security_
policies Sequence[str] - Access policy.
- user_
name str - User name of account.
- worker_
instances_ Sequence[Kuberneteslists Cluster Worker Instances List] - An information list of cvm within the 'WORKER' clusters. Each element contains the following attributes:
- String
- The certificate used for access.
- cluster
As BooleanEnabled - (Deprecated) This argument is deprecated because the TKE auto-scaling group was no longer available. Indicates whether to enable cluster node auto scaling. Default is false.
- cluster
External StringEndpoint - External network address to access.
- cluster
Node NumberNum - Number of nodes in the cluster.
- domain String
- Domain name for access.
- id String
- The provider-assigned unique ID for this managed resource.
- kube
Config String - Kubernetes config.
- kube
Config StringIntranet - Kubernetes config of private network.
- password String
- Password of account.
- pgw
Endpoint String - The Intranet address used for access.
- security
Policies List<String> - Access policy.
- user
Name String - User name of account.
- worker
Instances List<Property Map>Lists - An information list of cvm within the 'WORKER' clusters. Each element contains the following attributes:
Look up Existing KubernetesCluster Resource
Get an existing KubernetesCluster resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: KubernetesClusterState, opts?: CustomResourceOptions): KubernetesCluster
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
acquire_cluster_admin_role: Optional[bool] = None,
auth_options: Optional[KubernetesClusterAuthOptionsArgs] = None,
auto_upgrade_cluster_level: Optional[bool] = None,
base_pod_num: Optional[float] = None,
cdc_id: Optional[str] = None,
certification_authority: Optional[str] = None,
claim_expired_seconds: Optional[float] = None,
cluster_as_enabled: Optional[bool] = None,
cluster_audit: Optional[KubernetesClusterClusterAuditArgs] = None,
cluster_cidr: Optional[str] = None,
cluster_deploy_type: Optional[str] = None,
cluster_desc: Optional[str] = None,
cluster_external_endpoint: Optional[str] = None,
cluster_extra_args: Optional[KubernetesClusterClusterExtraArgsArgs] = None,
cluster_internet: Optional[bool] = None,
cluster_internet_domain: Optional[str] = None,
cluster_internet_security_group: Optional[str] = None,
cluster_intranet: Optional[bool] = None,
cluster_intranet_domain: Optional[str] = None,
cluster_intranet_subnet_id: Optional[str] = None,
cluster_ipvs: Optional[bool] = None,
cluster_level: Optional[str] = None,
cluster_max_pod_num: Optional[float] = None,
cluster_max_service_num: Optional[float] = None,
cluster_name: Optional[str] = None,
cluster_node_num: Optional[float] = None,
cluster_os: Optional[str] = None,
cluster_os_type: Optional[str] = None,
cluster_subnet_id: Optional[str] = None,
cluster_version: Optional[str] = None,
container_runtime: Optional[str] = None,
deletion_protection: Optional[bool] = None,
docker_graph_path: Optional[str] = None,
domain: Optional[str] = None,
enable_customized_pod_cidr: Optional[bool] = None,
eni_subnet_ids: Optional[Sequence[str]] = None,
event_persistence: Optional[KubernetesClusterEventPersistenceArgs] = None,
exist_instances: Optional[Sequence[KubernetesClusterExistInstanceArgs]] = None,
extension_addons: Optional[Sequence[KubernetesClusterExtensionAddonArgs]] = None,
extra_args: Optional[Sequence[str]] = None,
globe_desired_pod_num: Optional[float] = None,
ignore_cluster_cidr_conflict: Optional[bool] = None,
ignore_service_cidr_conflict: Optional[bool] = None,
instance_delete_mode: Optional[str] = None,
is_non_static_ip_mode: Optional[bool] = None,
kube_config: Optional[str] = None,
kube_config_intranet: Optional[str] = None,
kube_proxy_mode: Optional[str] = None,
kubernetes_cluster_id: Optional[str] = None,
labels: Optional[Mapping[str, str]] = None,
log_agent: Optional[KubernetesClusterLogAgentArgs] = None,
managed_cluster_internet_security_policies: Optional[Sequence[str]] = None,
master_configs: Optional[Sequence[KubernetesClusterMasterConfigArgs]] = None,
mount_target: Optional[str] = None,
network_type: Optional[str] = None,
node_name_type: Optional[str] = None,
node_pool_global_configs: Optional[Sequence[KubernetesClusterNodePoolGlobalConfigArgs]] = None,
password: Optional[str] = None,
pgw_endpoint: Optional[str] = None,
pre_start_user_script: Optional[str] = None,
project_id: Optional[float] = None,
resource_delete_options: Optional[Sequence[KubernetesClusterResourceDeleteOptionArgs]] = None,
runtime_version: Optional[str] = None,
security_policies: Optional[Sequence[str]] = None,
service_cidr: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
unschedulable: Optional[float] = None,
upgrade_instances_follow_cluster: Optional[bool] = None,
user_name: Optional[str] = None,
vpc_cni_type: Optional[str] = None,
vpc_id: Optional[str] = None,
worker_configs: Optional[Sequence[KubernetesClusterWorkerConfigArgs]] = None,
worker_instances_lists: Optional[Sequence[KubernetesClusterWorkerInstancesListArgs]] = None) -> KubernetesCluster
func GetKubernetesCluster(ctx *Context, name string, id IDInput, state *KubernetesClusterState, opts ...ResourceOption) (*KubernetesCluster, error)
public static KubernetesCluster Get(string name, Input<string> id, KubernetesClusterState? state, CustomResourceOptions? opts = null)
public static KubernetesCluster get(String name, Output<String> id, KubernetesClusterState state, CustomResourceOptions options)
resources: _: type: tencentcloud:KubernetesCluster get: id: ${id}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Acquire
Cluster boolAdmin Role - If set to true, it will acquire the ClusterRole tke:admin. NOTE: this arguments cannot revoke to
false
after acquired. - Auth
Options KubernetesCluster Auth Options - Specify cluster authentication configuration. Only available for managed cluster and
cluster_version
>= 1.20. - Auto
Upgrade boolCluster Level - Whether the cluster level auto upgraded, valid for managed cluster.
- Base
Pod doubleNum - The number of basic pods. valid when enable_customized_pod_cidr=true.
- Cdc
Id string - CDC ID.
- string
- The certificate used for access.
- Claim
Expired doubleSeconds - Claim expired seconds to recycle ENI. This field can only set when field
network_type
is 'VPC-CNI'.claim_expired_seconds
must greater or equal than 300 and less than 15768000. - Cluster
As boolEnabled - (Deprecated) This argument is deprecated because the TKE auto-scaling group was no longer available. Indicates whether to enable cluster node auto scaling. Default is false.
- Cluster
Audit KubernetesCluster Cluster Audit - Specify Cluster Audit config. NOTE: Please make sure your TKE CamRole have permission to access CLS service.
- Cluster
Cidr string - A network address block of the cluster. Different from vpc cidr and cidr of other clusters within this vpc. Must be in 10./192.168/172.[16-31] segments.
- Cluster
Deploy stringType - Deployment type of the cluster, the available values include: 'MANAGED_CLUSTER' and 'INDEPENDENT_CLUSTER'. Default is 'MANAGED_CLUSTER'.
- Cluster
Desc string - Description of the cluster.
- Cluster
External stringEndpoint - External network address to access.
- Cluster
Extra KubernetesArgs Cluster Cluster Extra Args - Customized parameters for master component,such as kube-apiserver, kube-controller-manager, kube-scheduler.
- Cluster
Internet bool - Open internet access or not. If this field is set 'true', the field below
worker_config
must be set. Because only cluster with node is allowed enable access endpoint. You may open it throughtencentcloud.KubernetesClusterEndpoint
. - Cluster
Internet stringDomain - Domain name for cluster Kube-apiserver internet access. Be careful if you modify value of this parameter, the cluster_external_endpoint value may be changed automatically too.
- Cluster
Internet stringSecurity Group - Specify security group, NOTE: This argument must not be empty if cluster internet enabled.
- Cluster
Intranet bool - Open intranet access or not. If this field is set 'true', the field below
worker_config
must be set. Because only cluster with node is allowed enable access endpoint. You may open it throughtencentcloud.KubernetesClusterEndpoint
. - Cluster
Intranet stringDomain - Domain name for cluster Kube-apiserver intranet access. Be careful if you modify value of this parameter, the pgw_endpoint value may be changed automatically too.
- Cluster
Intranet stringSubnet Id - Subnet id who can access this independent cluster, this field must and can only set when
cluster_intranet
is true.cluster_intranet_subnet_id
can not modify once be set. - Cluster
Ipvs bool - Indicates whether
ipvs
is enabled. Default is true. False meansiptables
is enabled. - Cluster
Level string - Specify cluster level, valid for managed cluster, use data source
tencentcloud.getKubernetesClusterLevels
to query available levels. Available value examplesL5
,L20
,L50
,L100
, etc. - Cluster
Max doublePod Num - The maximum number of Pods per node in the cluster. Default is 256. The minimum value is 4. When its power unequal to 2, it will round upward to the closest power of 2.
- Cluster
Max doubleService Num - The maximum number of services in the cluster. Default is 256. The range is from 32 to 32768. When its power unequal to 2, it will round upward to the closest power of 2.
- Cluster
Name string - Name of the cluster.
- Cluster
Node doubleNum - Number of nodes in the cluster.
- Cluster
Os string - Cluster operating system, supports setting public images (the field passes the corresponding image Name) and custom images (the field passes the corresponding image ID). For details, please refer to: https://cloud.tencent.com/document/product/457/68289.
- Cluster
Os stringType - Image type of the cluster os, the available values include: 'GENERAL'. Default is 'GENERAL'.
- Cluster
Subnet stringId - Subnet ID of the cluster, such as: subnet-b3p7d7q5.
- Cluster
Version string - Version of the cluster. Use
tencentcloud.getKubernetesAvailableClusterVersions
to get the upgradable cluster version. - Container
Runtime string - Runtime type of the cluster, the available values include: 'docker' and 'containerd'.The Kubernetes v1.24 has removed dockershim, so please use containerd in v1.24 or higher.Default is 'docker'.
- Deletion
Protection bool - Indicates whether cluster deletion protection is enabled. Default is false.
- Docker
Graph stringPath - Docker graph path. Default is
/var/lib/docker
. - Domain string
- Domain name for access.
- Enable
Customized boolPod Cidr - Whether to enable the custom mode of node podCIDR size. Default is false.
- Eni
Subnet List<string>Ids - Subnet Ids for cluster with VPC-CNI network mode. This field can only set when field
network_type
is 'VPC-CNI'.eni_subnet_ids
can not empty once be set. - Event
Persistence KubernetesCluster Event Persistence - Specify cluster Event Persistence config. NOTE: Please make sure your TKE CamRole have permission to access CLS service.
- Exist
Instances List<KubernetesCluster Exist Instance> - create tke cluster by existed instances.
- Extension
Addons List<KubernetesCluster Extension Addon> - Information of the add-on to be installed.
- Extra
Args List<string> - Custom parameter information related to the node.
- Globe
Desired doublePod Num - Indicate to set desired pod number in node. valid when enable_customized_pod_cidr=true, and it takes effect for all nodes.
- Ignore
Cluster boolCidr Conflict - Indicates whether to ignore the cluster cidr conflict error. Default is false.
- Ignore
Service boolCidr Conflict - Indicates whether to ignore the service cidr conflict error. Only valid in
VPC-CNI
mode. - Instance
Delete stringMode - The strategy for deleting cluster instances: terminate (destroy instances, only support pay as you go cloud host instances) retain (remove only, keep instances), Default is terminate.
- Is
Non boolStatic Ip Mode - Indicates whether non-static ip mode is enabled. Default is false.
- Kube
Config string - Kubernetes config.
- Kube
Config stringIntranet - Kubernetes config of private network.
- Kube
Proxy stringMode - Cluster kube-proxy mode, the available values include: 'kube-proxy-bpf'. Default is not set.When set to kube-proxy-bpf, cluster version greater than 1.14 and with Tencent Linux 2.4 is required.
- Kubernetes
Cluster stringId - ID of the resource.
- Labels Dictionary<string, string>
- Labels of tke cluster nodes.
- Log
Agent KubernetesCluster Log Agent - Specify cluster log agent config.
- Managed
Cluster List<string>Internet Security Policies - this argument was deprecated, use
cluster_internet_security_group
instead. Security policies for managed cluster internet, like:'192.168.1.0/24' or '113.116.51.27', '0.0.0.0/0' means all. This field can only set when fieldcluster_deploy_type
is 'MANAGED_CLUSTER' andcluster_internet
is true.managed_cluster_internet_security_policies
can not delete or empty once be set. - Master
Configs List<KubernetesCluster Master Config> - Deploy the machine configuration information of the 'MASTER_ETCD' service, and create <=7 units for common users.
- Mount
Target string - Mount target. Default is not mounting.
- Network
Type string - Cluster network type, the available values include: 'GR' and 'VPC-CNI' and 'CiliumOverlay'. Default is GR.
- Node
Name stringType - Node name type of Cluster, the available values include: 'lan-ip' and 'hostname', Default is 'lan-ip'.
- Node
Pool List<KubernetesGlobal Configs Cluster Node Pool Global Config> - Global config effective for all node pools.
- Password string
- Password of account.
- Pgw
Endpoint string - The Intranet address used for access.
- Pre
Start stringUser Script - Base64-encoded user script, executed before initializing the node, currently only effective for adding existing nodes.
- Project
Id double - Project ID, default value is 0.
- Resource
Delete List<KubernetesOptions Cluster Resource Delete Option> - The resource deletion policy when the cluster is deleted. Currently, CBS is supported (CBS is retained by default). Only valid when deleting cluster.
- Runtime
Version string - Container Runtime version.
- Security
Policies List<string> - Access policy.
- Service
Cidr string - A network address block of the service. Different from vpc cidr and cidr of other clusters within this vpc. Must be in 10./192.168/172.[16-31] segments.
- Dictionary<string, string>
- The tags of the cluster.
- Unschedulable double
- Sets whether the joining node participates in the schedule. Default is '0'. Participate in scheduling.
- Upgrade
Instances boolFollow Cluster - Indicates whether upgrade all instances when cluster_version change. Default is false.
- User
Name string - User name of account.
- Vpc
Cni stringType - Distinguish between shared network card multi-IP mode and independent network card mode. Fill in
tke-route-eni
for shared network card multi-IP mode andtke-direct-eni
for independent network card mode. The default is shared network card mode. When it is necessary to turn off the vpc-cni container network capability, botheni_subnet_ids
andvpc_cni_type
must be set to empty. - Vpc
Id string - Vpc Id of the cluster.
- Worker
Configs List<KubernetesCluster Worker Config> - Deploy the machine configuration information of the 'WORKER' service, and create <=20 units for common users. The other 'WORK' service are added by 'tencentcloud_kubernetes_scale_worker'.
- Worker
Instances List<KubernetesLists Cluster Worker Instances List> - An information list of cvm within the 'WORKER' clusters. Each element contains the following attributes:
- Acquire
Cluster boolAdmin Role - If set to true, it will acquire the ClusterRole tke:admin. NOTE: this arguments cannot revoke to
false
after acquired. - Auth
Options KubernetesCluster Auth Options Args - Specify cluster authentication configuration. Only available for managed cluster and
cluster_version
>= 1.20. - Auto
Upgrade boolCluster Level - Whether the cluster level auto upgraded, valid for managed cluster.
- Base
Pod float64Num - The number of basic pods. valid when enable_customized_pod_cidr=true.
- Cdc
Id string - CDC ID.
- string
- The certificate used for access.
- Claim
Expired float64Seconds - Claim expired seconds to recycle ENI. This field can only set when field
network_type
is 'VPC-CNI'.claim_expired_seconds
must greater or equal than 300 and less than 15768000. - Cluster
As boolEnabled - (Deprecated) This argument is deprecated because the TKE auto-scaling group was no longer available. Indicates whether to enable cluster node auto scaling. Default is false.
- Cluster
Audit KubernetesCluster Cluster Audit Args - Specify Cluster Audit config. NOTE: Please make sure your TKE CamRole have permission to access CLS service.
- Cluster
Cidr string - A network address block of the cluster. Different from vpc cidr and cidr of other clusters within this vpc. Must be in 10./192.168/172.[16-31] segments.
- Cluster
Deploy stringType - Deployment type of the cluster, the available values include: 'MANAGED_CLUSTER' and 'INDEPENDENT_CLUSTER'. Default is 'MANAGED_CLUSTER'.
- Cluster
Desc string - Description of the cluster.
- Cluster
External stringEndpoint - External network address to access.
- Cluster
Extra KubernetesArgs Cluster Cluster Extra Args Args - Customized parameters for master component,such as kube-apiserver, kube-controller-manager, kube-scheduler.
- Cluster
Internet bool - Open internet access or not. If this field is set 'true', the field below
worker_config
must be set. Because only cluster with node is allowed enable access endpoint. You may open it throughtencentcloud.KubernetesClusterEndpoint
. - Cluster
Internet stringDomain - Domain name for cluster Kube-apiserver internet access. Be careful if you modify value of this parameter, the cluster_external_endpoint value may be changed automatically too.
- Cluster
Internet stringSecurity Group - Specify security group, NOTE: This argument must not be empty if cluster internet enabled.
- Cluster
Intranet bool - Open intranet access or not. If this field is set 'true', the field below
worker_config
must be set. Because only cluster with node is allowed enable access endpoint. You may open it throughtencentcloud.KubernetesClusterEndpoint
. - Cluster
Intranet stringDomain - Domain name for cluster Kube-apiserver intranet access. Be careful if you modify value of this parameter, the pgw_endpoint value may be changed automatically too.
- Cluster
Intranet stringSubnet Id - Subnet id who can access this independent cluster, this field must and can only set when
cluster_intranet
is true.cluster_intranet_subnet_id
can not modify once be set. - Cluster
Ipvs bool - Indicates whether
ipvs
is enabled. Default is true. False meansiptables
is enabled. - Cluster
Level string - Specify cluster level, valid for managed cluster, use data source
tencentcloud.getKubernetesClusterLevels
to query available levels. Available value examplesL5
,L20
,L50
,L100
, etc. - Cluster
Max float64Pod Num - The maximum number of Pods per node in the cluster. Default is 256. The minimum value is 4. When its power unequal to 2, it will round upward to the closest power of 2.
- Cluster
Max float64Service Num - The maximum number of services in the cluster. Default is 256. The range is from 32 to 32768. When its power unequal to 2, it will round upward to the closest power of 2.
- Cluster
Name string - Name of the cluster.
- Cluster
Node float64Num - Number of nodes in the cluster.
- Cluster
Os string - Cluster operating system, supports setting public images (the field passes the corresponding image Name) and custom images (the field passes the corresponding image ID). For details, please refer to: https://cloud.tencent.com/document/product/457/68289.
- Cluster
Os stringType - Image type of the cluster os, the available values include: 'GENERAL'. Default is 'GENERAL'.
- Cluster
Subnet stringId - Subnet ID of the cluster, such as: subnet-b3p7d7q5.
- Cluster
Version string - Version of the cluster. Use
tencentcloud.getKubernetesAvailableClusterVersions
to get the upgradable cluster version. - Container
Runtime string - Runtime type of the cluster, the available values include: 'docker' and 'containerd'.The Kubernetes v1.24 has removed dockershim, so please use containerd in v1.24 or higher.Default is 'docker'.
- Deletion
Protection bool - Indicates whether cluster deletion protection is enabled. Default is false.
- Docker
Graph stringPath - Docker graph path. Default is
/var/lib/docker
. - Domain string
- Domain name for access.
- Enable
Customized boolPod Cidr - Whether to enable the custom mode of node podCIDR size. Default is false.
- Eni
Subnet []stringIds - Subnet Ids for cluster with VPC-CNI network mode. This field can only set when field
network_type
is 'VPC-CNI'.eni_subnet_ids
can not empty once be set. - Event
Persistence KubernetesCluster Event Persistence Args - Specify cluster Event Persistence config. NOTE: Please make sure your TKE CamRole have permission to access CLS service.
- Exist
Instances []KubernetesCluster Exist Instance Args - create tke cluster by existed instances.
- Extension
Addons []KubernetesCluster Extension Addon Args - Information of the add-on to be installed.
- Extra
Args []string - Custom parameter information related to the node.
- Globe
Desired float64Pod Num - Indicate to set desired pod number in node. valid when enable_customized_pod_cidr=true, and it takes effect for all nodes.
- Ignore
Cluster boolCidr Conflict - Indicates whether to ignore the cluster cidr conflict error. Default is false.
- Ignore
Service boolCidr Conflict - Indicates whether to ignore the service cidr conflict error. Only valid in
VPC-CNI
mode. - Instance
Delete stringMode - The strategy for deleting cluster instances: terminate (destroy instances, only support pay as you go cloud host instances) retain (remove only, keep instances), Default is terminate.
- Is
Non boolStatic Ip Mode - Indicates whether non-static ip mode is enabled. Default is false.
- Kube
Config string - Kubernetes config.
- Kube
Config stringIntranet - Kubernetes config of private network.
- Kube
Proxy stringMode - Cluster kube-proxy mode, the available values include: 'kube-proxy-bpf'. Default is not set.When set to kube-proxy-bpf, cluster version greater than 1.14 and with Tencent Linux 2.4 is required.
- Kubernetes
Cluster stringId - ID of the resource.
- Labels map[string]string
- Labels of tke cluster nodes.
- Log
Agent KubernetesCluster Log Agent Args - Specify cluster log agent config.
- Managed
Cluster []stringInternet Security Policies - this argument was deprecated, use
cluster_internet_security_group
instead. Security policies for managed cluster internet, like:'192.168.1.0/24' or '113.116.51.27', '0.0.0.0/0' means all. This field can only set when fieldcluster_deploy_type
is 'MANAGED_CLUSTER' andcluster_internet
is true.managed_cluster_internet_security_policies
can not delete or empty once be set. - Master
Configs []KubernetesCluster Master Config Args - Deploy the machine configuration information of the 'MASTER_ETCD' service, and create <=7 units for common users.
- Mount
Target string - Mount target. Default is not mounting.
- Network
Type string - Cluster network type, the available values include: 'GR' and 'VPC-CNI' and 'CiliumOverlay'. Default is GR.
- Node
Name stringType - Node name type of Cluster, the available values include: 'lan-ip' and 'hostname', Default is 'lan-ip'.
- Node
Pool []KubernetesGlobal Configs Cluster Node Pool Global Config Args - Global config effective for all node pools.
- Password string
- Password of account.
- Pgw
Endpoint string - The Intranet address used for access.
- Pre
Start stringUser Script - Base64-encoded user script, executed before initializing the node, currently only effective for adding existing nodes.
- Project
Id float64 - Project ID, default value is 0.
- Resource
Delete []KubernetesOptions Cluster Resource Delete Option Args - The resource deletion policy when the cluster is deleted. Currently, CBS is supported (CBS is retained by default). Only valid when deleting cluster.
- Runtime
Version string - Container Runtime version.
- Security
Policies []string - Access policy.
- Service
Cidr string - A network address block of the service. Different from vpc cidr and cidr of other clusters within this vpc. Must be in 10./192.168/172.[16-31] segments.
- map[string]string
- The tags of the cluster.
- Unschedulable float64
- Sets whether the joining node participates in the schedule. Default is '0'. Participate in scheduling.
- Upgrade
Instances boolFollow Cluster - Indicates whether upgrade all instances when cluster_version change. Default is false.
- User
Name string - User name of account.
- Vpc
Cni stringType - Distinguish between shared network card multi-IP mode and independent network card mode. Fill in
tke-route-eni
for shared network card multi-IP mode andtke-direct-eni
for independent network card mode. The default is shared network card mode. When it is necessary to turn off the vpc-cni container network capability, botheni_subnet_ids
andvpc_cni_type
must be set to empty. - Vpc
Id string - Vpc Id of the cluster.
- Worker
Configs []KubernetesCluster Worker Config Args - Deploy the machine configuration information of the 'WORKER' service, and create <=20 units for common users. The other 'WORK' service are added by 'tencentcloud_kubernetes_scale_worker'.
- Worker
Instances []KubernetesLists Cluster Worker Instances List Args - An information list of cvm within the 'WORKER' clusters. Each element contains the following attributes:
- acquire
Cluster BooleanAdmin Role - If set to true, it will acquire the ClusterRole tke:admin. NOTE: this arguments cannot revoke to
false
after acquired. - auth
Options KubernetesCluster Auth Options - Specify cluster authentication configuration. Only available for managed cluster and
cluster_version
>= 1.20. - auto
Upgrade BooleanCluster Level - Whether the cluster level auto upgraded, valid for managed cluster.
- base
Pod DoubleNum - The number of basic pods. valid when enable_customized_pod_cidr=true.
- cdc
Id String - CDC ID.
- String
- The certificate used for access.
- claim
Expired DoubleSeconds - Claim expired seconds to recycle ENI. This field can only set when field
network_type
is 'VPC-CNI'.claim_expired_seconds
must greater or equal than 300 and less than 15768000. - cluster
As BooleanEnabled - (Deprecated) This argument is deprecated because the TKE auto-scaling group was no longer available. Indicates whether to enable cluster node auto scaling. Default is false.
- cluster
Audit KubernetesCluster Cluster Audit - Specify Cluster Audit config. NOTE: Please make sure your TKE CamRole have permission to access CLS service.
- cluster
Cidr String - A network address block of the cluster. Different from vpc cidr and cidr of other clusters within this vpc. Must be in 10./192.168/172.[16-31] segments.
- cluster
Deploy StringType - Deployment type of the cluster, the available values include: 'MANAGED_CLUSTER' and 'INDEPENDENT_CLUSTER'. Default is 'MANAGED_CLUSTER'.
- cluster
Desc String - Description of the cluster.
- cluster
External StringEndpoint - External network address to access.
- cluster
Extra KubernetesArgs Cluster Cluster Extra Args - Customized parameters for master component,such as kube-apiserver, kube-controller-manager, kube-scheduler.
- cluster
Internet Boolean - Open internet access or not. If this field is set 'true', the field below
worker_config
must be set. Because only cluster with node is allowed enable access endpoint. You may open it throughtencentcloud.KubernetesClusterEndpoint
. - cluster
Internet StringDomain - Domain name for cluster Kube-apiserver internet access. Be careful if you modify value of this parameter, the cluster_external_endpoint value may be changed automatically too.
- cluster
Internet StringSecurity Group - Specify security group, NOTE: This argument must not be empty if cluster internet enabled.
- cluster
Intranet Boolean - Open intranet access or not. If this field is set 'true', the field below
worker_config
must be set. Because only cluster with node is allowed enable access endpoint. You may open it throughtencentcloud.KubernetesClusterEndpoint
. - cluster
Intranet StringDomain - Domain name for cluster Kube-apiserver intranet access. Be careful if you modify value of this parameter, the pgw_endpoint value may be changed automatically too.
- cluster
Intranet StringSubnet Id - Subnet id who can access this independent cluster, this field must and can only set when
cluster_intranet
is true.cluster_intranet_subnet_id
can not modify once be set. - cluster
Ipvs Boolean - Indicates whether
ipvs
is enabled. Default is true. False meansiptables
is enabled. - cluster
Level String - Specify cluster level, valid for managed cluster, use data source
tencentcloud.getKubernetesClusterLevels
to query available levels. Available value examplesL5
,L20
,L50
,L100
, etc. - cluster
Max DoublePod Num - The maximum number of Pods per node in the cluster. Default is 256. The minimum value is 4. When its power unequal to 2, it will round upward to the closest power of 2.
- cluster
Max DoubleService Num - The maximum number of services in the cluster. Default is 256. The range is from 32 to 32768. When its power unequal to 2, it will round upward to the closest power of 2.
- cluster
Name String - Name of the cluster.
- cluster
Node DoubleNum - Number of nodes in the cluster.
- cluster
Os String - Cluster operating system, supports setting public images (the field passes the corresponding image Name) and custom images (the field passes the corresponding image ID). For details, please refer to: https://cloud.tencent.com/document/product/457/68289.
- cluster
Os StringType - Image type of the cluster os, the available values include: 'GENERAL'. Default is 'GENERAL'.
- cluster
Subnet StringId - Subnet ID of the cluster, such as: subnet-b3p7d7q5.
- cluster
Version String - Version of the cluster. Use
tencentcloud.getKubernetesAvailableClusterVersions
to get the upgradable cluster version. - container
Runtime String - Runtime type of the cluster, the available values include: 'docker' and 'containerd'.The Kubernetes v1.24 has removed dockershim, so please use containerd in v1.24 or higher.Default is 'docker'.
- deletion
Protection Boolean - Indicates whether cluster deletion protection is enabled. Default is false.
- docker
Graph StringPath - Docker graph path. Default is
/var/lib/docker
. - domain String
- Domain name for access.
- enable
Customized BooleanPod Cidr - Whether to enable the custom mode of node podCIDR size. Default is false.
- eni
Subnet List<String>Ids - Subnet Ids for cluster with VPC-CNI network mode. This field can only set when field
network_type
is 'VPC-CNI'.eni_subnet_ids
can not empty once be set. - event
Persistence KubernetesCluster Event Persistence - Specify cluster Event Persistence config. NOTE: Please make sure your TKE CamRole have permission to access CLS service.
- exist
Instances List<KubernetesCluster Exist Instance> - create tke cluster by existed instances.
- extension
Addons List<KubernetesCluster Extension Addon> - Information of the add-on to be installed.
- extra
Args List<String> - Custom parameter information related to the node.
- globe
Desired DoublePod Num - Indicate to set desired pod number in node. valid when enable_customized_pod_cidr=true, and it takes effect for all nodes.
- ignore
Cluster BooleanCidr Conflict - Indicates whether to ignore the cluster cidr conflict error. Default is false.
- ignore
Service BooleanCidr Conflict - Indicates whether to ignore the service cidr conflict error. Only valid in
VPC-CNI
mode. - instance
Delete StringMode - The strategy for deleting cluster instances: terminate (destroy instances, only support pay as you go cloud host instances) retain (remove only, keep instances), Default is terminate.
- is
Non BooleanStatic Ip Mode - Indicates whether non-static ip mode is enabled. Default is false.
- kube
Config String - Kubernetes config.
- kube
Config StringIntranet - Kubernetes config of private network.
- kube
Proxy StringMode - Cluster kube-proxy mode, the available values include: 'kube-proxy-bpf'. Default is not set.When set to kube-proxy-bpf, cluster version greater than 1.14 and with Tencent Linux 2.4 is required.
- kubernetes
Cluster StringId - ID of the resource.
- labels Map<String,String>
- Labels of tke cluster nodes.
- log
Agent KubernetesCluster Log Agent - Specify cluster log agent config.
- managed
Cluster List<String>Internet Security Policies - this argument was deprecated, use
cluster_internet_security_group
instead. Security policies for managed cluster internet, like:'192.168.1.0/24' or '113.116.51.27', '0.0.0.0/0' means all. This field can only set when fieldcluster_deploy_type
is 'MANAGED_CLUSTER' andcluster_internet
is true.managed_cluster_internet_security_policies
can not delete or empty once be set. - master
Configs List<KubernetesCluster Master Config> - Deploy the machine configuration information of the 'MASTER_ETCD' service, and create <=7 units for common users.
- mount
Target String - Mount target. Default is not mounting.
- network
Type String - Cluster network type, the available values include: 'GR' and 'VPC-CNI' and 'CiliumOverlay'. Default is GR.
- node
Name StringType - Node name type of Cluster, the available values include: 'lan-ip' and 'hostname', Default is 'lan-ip'.
- node
Pool List<KubernetesGlobal Configs Cluster Node Pool Global Config> - Global config effective for all node pools.
- password String
- Password of account.
- pgw
Endpoint String - The Intranet address used for access.
- pre
Start StringUser Script - Base64-encoded user script, executed before initializing the node, currently only effective for adding existing nodes.
- project
Id Double - Project ID, default value is 0.
- resource
Delete List<KubernetesOptions Cluster Resource Delete Option> - The resource deletion policy when the cluster is deleted. Currently, CBS is supported (CBS is retained by default). Only valid when deleting cluster.
- runtime
Version String - Container Runtime version.
- security
Policies List<String> - Access policy.
- service
Cidr String - A network address block of the service. Different from vpc cidr and cidr of other clusters within this vpc. Must be in 10./192.168/172.[16-31] segments.
- Map<String,String>
- The tags of the cluster.
- unschedulable Double
- Sets whether the joining node participates in the schedule. Default is '0'. Participate in scheduling.
- upgrade
Instances BooleanFollow Cluster - Indicates whether upgrade all instances when cluster_version change. Default is false.
- user
Name String - User name of account.
- vpc
Cni StringType - Distinguish between shared network card multi-IP mode and independent network card mode. Fill in
tke-route-eni
for shared network card multi-IP mode andtke-direct-eni
for independent network card mode. The default is shared network card mode. When it is necessary to turn off the vpc-cni container network capability, botheni_subnet_ids
andvpc_cni_type
must be set to empty. - vpc
Id String - Vpc Id of the cluster.
- worker
Configs List<KubernetesCluster Worker Config> - Deploy the machine configuration information of the 'WORKER' service, and create <=20 units for common users. The other 'WORK' service are added by 'tencentcloud_kubernetes_scale_worker'.
- worker
Instances List<KubernetesLists Cluster Worker Instances List> - An information list of cvm within the 'WORKER' clusters. Each element contains the following attributes:
- acquire
Cluster booleanAdmin Role - If set to true, it will acquire the ClusterRole tke:admin. NOTE: this arguments cannot revoke to
false
after acquired. - auth
Options KubernetesCluster Auth Options - Specify cluster authentication configuration. Only available for managed cluster and
cluster_version
>= 1.20. - auto
Upgrade booleanCluster Level - Whether the cluster level auto upgraded, valid for managed cluster.
- base
Pod numberNum - The number of basic pods. valid when enable_customized_pod_cidr=true.
- cdc
Id string - CDC ID.
- string
- The certificate used for access.
- claim
Expired numberSeconds - Claim expired seconds to recycle ENI. This field can only set when field
network_type
is 'VPC-CNI'.claim_expired_seconds
must greater or equal than 300 and less than 15768000. - cluster
As booleanEnabled - (Deprecated) This argument is deprecated because the TKE auto-scaling group was no longer available. Indicates whether to enable cluster node auto scaling. Default is false.
- cluster
Audit KubernetesCluster Cluster Audit - Specify Cluster Audit config. NOTE: Please make sure your TKE CamRole have permission to access CLS service.
- cluster
Cidr string - A network address block of the cluster. Different from vpc cidr and cidr of other clusters within this vpc. Must be in 10./192.168/172.[16-31] segments.
- cluster
Deploy stringType - Deployment type of the cluster, the available values include: 'MANAGED_CLUSTER' and 'INDEPENDENT_CLUSTER'. Default is 'MANAGED_CLUSTER'.
- cluster
Desc string - Description of the cluster.
- cluster
External stringEndpoint - External network address to access.
- cluster
Extra KubernetesArgs Cluster Cluster Extra Args - Customized parameters for master component,such as kube-apiserver, kube-controller-manager, kube-scheduler.
- cluster
Internet boolean - Open internet access or not. If this field is set 'true', the field below
worker_config
must be set. Because only cluster with node is allowed enable access endpoint. You may open it throughtencentcloud.KubernetesClusterEndpoint
. - cluster
Internet stringDomain - Domain name for cluster Kube-apiserver internet access. Be careful if you modify value of this parameter, the cluster_external_endpoint value may be changed automatically too.
- cluster
Internet stringSecurity Group - Specify security group, NOTE: This argument must not be empty if cluster internet enabled.
- cluster
Intranet boolean - Open intranet access or not. If this field is set 'true', the field below
worker_config
must be set. Because only cluster with node is allowed enable access endpoint. You may open it throughtencentcloud.KubernetesClusterEndpoint
. - cluster
Intranet stringDomain - Domain name for cluster Kube-apiserver intranet access. Be careful if you modify value of this parameter, the pgw_endpoint value may be changed automatically too.
- cluster
Intranet stringSubnet Id - Subnet id who can access this independent cluster, this field must and can only set when
cluster_intranet
is true.cluster_intranet_subnet_id
can not modify once be set. - cluster
Ipvs boolean - Indicates whether
ipvs
is enabled. Default is true. False meansiptables
is enabled. - cluster
Level string - Specify cluster level, valid for managed cluster, use data source
tencentcloud.getKubernetesClusterLevels
to query available levels. Available value examplesL5
,L20
,L50
,L100
, etc. - cluster
Max numberPod Num - The maximum number of Pods per node in the cluster. Default is 256. The minimum value is 4. When its power unequal to 2, it will round upward to the closest power of 2.
- cluster
Max numberService Num - The maximum number of services in the cluster. Default is 256. The range is from 32 to 32768. When its power unequal to 2, it will round upward to the closest power of 2.
- cluster
Name string - Name of the cluster.
- cluster
Node numberNum - Number of nodes in the cluster.
- cluster
Os string - Cluster operating system, supports setting public images (the field passes the corresponding image Name) and custom images (the field passes the corresponding image ID). For details, please refer to: https://cloud.tencent.com/document/product/457/68289.
- cluster
Os stringType - Image type of the cluster os, the available values include: 'GENERAL'. Default is 'GENERAL'.
- cluster
Subnet stringId - Subnet ID of the cluster, such as: subnet-b3p7d7q5.
- cluster
Version string - Version of the cluster. Use
tencentcloud.getKubernetesAvailableClusterVersions
to get the upgradable cluster version. - container
Runtime string - Runtime type of the cluster, the available values include: 'docker' and 'containerd'.The Kubernetes v1.24 has removed dockershim, so please use containerd in v1.24 or higher.Default is 'docker'.
- deletion
Protection boolean - Indicates whether cluster deletion protection is enabled. Default is false.
- docker
Graph stringPath - Docker graph path. Default is
/var/lib/docker
. - domain string
- Domain name for access.
- enable
Customized booleanPod Cidr - Whether to enable the custom mode of node podCIDR size. Default is false.
- eni
Subnet string[]Ids - Subnet Ids for cluster with VPC-CNI network mode. This field can only set when field
network_type
is 'VPC-CNI'.eni_subnet_ids
can not empty once be set. - event
Persistence KubernetesCluster Event Persistence - Specify cluster Event Persistence config. NOTE: Please make sure your TKE CamRole have permission to access CLS service.
- exist
Instances KubernetesCluster Exist Instance[] - create tke cluster by existed instances.
- extension
Addons KubernetesCluster Extension Addon[] - Information of the add-on to be installed.
- extra
Args string[] - Custom parameter information related to the node.
- globe
Desired numberPod Num - Indicate to set desired pod number in node. valid when enable_customized_pod_cidr=true, and it takes effect for all nodes.
- ignore
Cluster booleanCidr Conflict - Indicates whether to ignore the cluster cidr conflict error. Default is false.
- ignore
Service booleanCidr Conflict - Indicates whether to ignore the service cidr conflict error. Only valid in
VPC-CNI
mode. - instance
Delete stringMode - The strategy for deleting cluster instances: terminate (destroy instances, only support pay as you go cloud host instances) retain (remove only, keep instances), Default is terminate.
- is
Non booleanStatic Ip Mode - Indicates whether non-static ip mode is enabled. Default is false.
- kube
Config string - Kubernetes config.
- kube
Config stringIntranet - Kubernetes config of private network.
- kube
Proxy stringMode - Cluster kube-proxy mode, the available values include: 'kube-proxy-bpf'. Default is not set.When set to kube-proxy-bpf, cluster version greater than 1.14 and with Tencent Linux 2.4 is required.
- kubernetes
Cluster stringId - ID of the resource.
- labels {[key: string]: string}
- Labels of tke cluster nodes.
- log
Agent KubernetesCluster Log Agent - Specify cluster log agent config.
- managed
Cluster string[]Internet Security Policies - this argument was deprecated, use
cluster_internet_security_group
instead. Security policies for managed cluster internet, like:'192.168.1.0/24' or '113.116.51.27', '0.0.0.0/0' means all. This field can only set when fieldcluster_deploy_type
is 'MANAGED_CLUSTER' andcluster_internet
is true.managed_cluster_internet_security_policies
can not delete or empty once be set. - master
Configs KubernetesCluster Master Config[] - Deploy the machine configuration information of the 'MASTER_ETCD' service, and create <=7 units for common users.
- mount
Target string - Mount target. Default is not mounting.
- network
Type string - Cluster network type, the available values include: 'GR' and 'VPC-CNI' and 'CiliumOverlay'. Default is GR.
- node
Name stringType - Node name type of Cluster, the available values include: 'lan-ip' and 'hostname', Default is 'lan-ip'.
- node
Pool KubernetesGlobal Configs Cluster Node Pool Global Config[] - Global config effective for all node pools.
- password string
- Password of account.
- pgw
Endpoint string - The Intranet address used for access.
- pre
Start stringUser Script - Base64-encoded user script, executed before initializing the node, currently only effective for adding existing nodes.
- project
Id number - Project ID, default value is 0.
- resource
Delete KubernetesOptions Cluster Resource Delete Option[] - The resource deletion policy when the cluster is deleted. Currently, CBS is supported (CBS is retained by default). Only valid when deleting cluster.
- runtime
Version string - Container Runtime version.
- security
Policies string[] - Access policy.
- service
Cidr string - A network address block of the service. Different from vpc cidr and cidr of other clusters within this vpc. Must be in 10./192.168/172.[16-31] segments.
- {[key: string]: string}
- The tags of the cluster.
- unschedulable number
- Sets whether the joining node participates in the schedule. Default is '0'. Participate in scheduling.
- upgrade
Instances booleanFollow Cluster - Indicates whether upgrade all instances when cluster_version change. Default is false.
- user
Name string - User name of account.
- vpc
Cni stringType - Distinguish between shared network card multi-IP mode and independent network card mode. Fill in
tke-route-eni
for shared network card multi-IP mode andtke-direct-eni
for independent network card mode. The default is shared network card mode. When it is necessary to turn off the vpc-cni container network capability, botheni_subnet_ids
andvpc_cni_type
must be set to empty. - vpc
Id string - Vpc Id of the cluster.
- worker
Configs KubernetesCluster Worker Config[] - Deploy the machine configuration information of the 'WORKER' service, and create <=20 units for common users. The other 'WORK' service are added by 'tencentcloud_kubernetes_scale_worker'.
- worker
Instances KubernetesLists Cluster Worker Instances List[] - An information list of cvm within the 'WORKER' clusters. Each element contains the following attributes:
- acquire_
cluster_ booladmin_ role - If set to true, it will acquire the ClusterRole tke:admin. NOTE: this arguments cannot revoke to
false
after acquired. - auth_
options KubernetesCluster Auth Options Args - Specify cluster authentication configuration. Only available for managed cluster and
cluster_version
>= 1.20. - auto_
upgrade_ boolcluster_ level - Whether the cluster level auto upgraded, valid for managed cluster.
- base_
pod_ floatnum - The number of basic pods. valid when enable_customized_pod_cidr=true.
- cdc_
id str - CDC ID.
- str
- The certificate used for access.
- claim_
expired_ floatseconds - Claim expired seconds to recycle ENI. This field can only set when field
network_type
is 'VPC-CNI'.claim_expired_seconds
must greater or equal than 300 and less than 15768000. - cluster_
as_ boolenabled - (Deprecated) This argument is deprecated because the TKE auto-scaling group was no longer available. Indicates whether to enable cluster node auto scaling. Default is false.
- cluster_
audit KubernetesCluster Cluster Audit Args - Specify Cluster Audit config. NOTE: Please make sure your TKE CamRole have permission to access CLS service.
- cluster_
cidr str - A network address block of the cluster. Different from vpc cidr and cidr of other clusters within this vpc. Must be in 10./192.168/172.[16-31] segments.
- cluster_
deploy_ strtype - Deployment type of the cluster, the available values include: 'MANAGED_CLUSTER' and 'INDEPENDENT_CLUSTER'. Default is 'MANAGED_CLUSTER'.
- cluster_
desc str - Description of the cluster.
- cluster_
external_ strendpoint - External network address to access.
- cluster_
extra_ Kubernetesargs Cluster Cluster Extra Args Args - Customized parameters for master component,such as kube-apiserver, kube-controller-manager, kube-scheduler.
- cluster_
internet bool - Open internet access or not. If this field is set 'true', the field below
worker_config
must be set. Because only cluster with node is allowed enable access endpoint. You may open it throughtencentcloud.KubernetesClusterEndpoint
. - cluster_
internet_ strdomain - Domain name for cluster Kube-apiserver internet access. Be careful if you modify value of this parameter, the cluster_external_endpoint value may be changed automatically too.
- cluster_
internet_ strsecurity_ group - Specify security group, NOTE: This argument must not be empty if cluster internet enabled.
- cluster_
intranet bool - Open intranet access or not. If this field is set 'true', the field below
worker_config
must be set. Because only cluster with node is allowed enable access endpoint. You may open it throughtencentcloud.KubernetesClusterEndpoint
. - cluster_
intranet_ strdomain - Domain name for cluster Kube-apiserver intranet access. Be careful if you modify value of this parameter, the pgw_endpoint value may be changed automatically too.
- cluster_
intranet_ strsubnet_ id - Subnet id who can access this independent cluster, this field must and can only set when
cluster_intranet
is true.cluster_intranet_subnet_id
can not modify once be set. - cluster_
ipvs bool - Indicates whether
ipvs
is enabled. Default is true. False meansiptables
is enabled. - cluster_
level str - Specify cluster level, valid for managed cluster, use data source
tencentcloud.getKubernetesClusterLevels
to query available levels. Available value examplesL5
,L20
,L50
,L100
, etc. - cluster_
max_ floatpod_ num - The maximum number of Pods per node in the cluster. Default is 256. The minimum value is 4. When its power unequal to 2, it will round upward to the closest power of 2.
- cluster_
max_ floatservice_ num - The maximum number of services in the cluster. Default is 256. The range is from 32 to 32768. When its power unequal to 2, it will round upward to the closest power of 2.
- cluster_
name str - Name of the cluster.
- cluster_
node_ floatnum - Number of nodes in the cluster.
- cluster_
os str - Cluster operating system, supports setting public images (the field passes the corresponding image Name) and custom images (the field passes the corresponding image ID). For details, please refer to: https://cloud.tencent.com/document/product/457/68289.
- cluster_
os_ strtype - Image type of the cluster os, the available values include: 'GENERAL'. Default is 'GENERAL'.
- cluster_
subnet_ strid - Subnet ID of the cluster, such as: subnet-b3p7d7q5.
- cluster_
version str - Version of the cluster. Use
tencentcloud.getKubernetesAvailableClusterVersions
to get the upgradable cluster version. - container_
runtime str - Runtime type of the cluster, the available values include: 'docker' and 'containerd'.The Kubernetes v1.24 has removed dockershim, so please use containerd in v1.24 or higher.Default is 'docker'.
- deletion_
protection bool - Indicates whether cluster deletion protection is enabled. Default is false.
- docker_
graph_ strpath - Docker graph path. Default is
/var/lib/docker
. - domain str
- Domain name for access.
- enable_
customized_ boolpod_ cidr - Whether to enable the custom mode of node podCIDR size. Default is false.
- eni_
subnet_ Sequence[str]ids - Subnet Ids for cluster with VPC-CNI network mode. This field can only set when field
network_type
is 'VPC-CNI'.eni_subnet_ids
can not empty once be set. - event_
persistence KubernetesCluster Event Persistence Args - Specify cluster Event Persistence config. NOTE: Please make sure your TKE CamRole have permission to access CLS service.
- exist_
instances Sequence[KubernetesCluster Exist Instance Args] - create tke cluster by existed instances.
- extension_
addons Sequence[KubernetesCluster Extension Addon Args] - Information of the add-on to be installed.
- extra_
args Sequence[str] - Custom parameter information related to the node.
- globe_
desired_ floatpod_ num - Indicate to set desired pod number in node. valid when enable_customized_pod_cidr=true, and it takes effect for all nodes.
- ignore_
cluster_ boolcidr_ conflict - Indicates whether to ignore the cluster cidr conflict error. Default is false.
- ignore_
service_ boolcidr_ conflict - Indicates whether to ignore the service cidr conflict error. Only valid in
VPC-CNI
mode. - instance_
delete_ strmode - The strategy for deleting cluster instances: terminate (destroy instances, only support pay as you go cloud host instances) retain (remove only, keep instances), Default is terminate.
- is_
non_ boolstatic_ ip_ mode - Indicates whether non-static ip mode is enabled. Default is false.
- kube_
config str - Kubernetes config.
- kube_
config_ strintranet - Kubernetes config of private network.
- kube_
proxy_ strmode - Cluster kube-proxy mode, the available values include: 'kube-proxy-bpf'. Default is not set.When set to kube-proxy-bpf, cluster version greater than 1.14 and with Tencent Linux 2.4 is required.
- kubernetes_
cluster_ strid - ID of the resource.
- labels Mapping[str, str]
- Labels of tke cluster nodes.
- log_
agent KubernetesCluster Log Agent Args - Specify cluster log agent config.
- managed_
cluster_ Sequence[str]internet_ security_ policies - this argument was deprecated, use
cluster_internet_security_group
instead. Security policies for managed cluster internet, like:'192.168.1.0/24' or '113.116.51.27', '0.0.0.0/0' means all. This field can only set when fieldcluster_deploy_type
is 'MANAGED_CLUSTER' andcluster_internet
is true.managed_cluster_internet_security_policies
can not delete or empty once be set. - master_
configs Sequence[KubernetesCluster Master Config Args] - Deploy the machine configuration information of the 'MASTER_ETCD' service, and create <=7 units for common users.
- mount_
target str - Mount target. Default is not mounting.
- network_
type str - Cluster network type, the available values include: 'GR' and 'VPC-CNI' and 'CiliumOverlay'. Default is GR.
- node_
name_ strtype - Node name type of Cluster, the available values include: 'lan-ip' and 'hostname', Default is 'lan-ip'.
- node_
pool_ Sequence[Kubernetesglobal_ configs Cluster Node Pool Global Config Args] - Global config effective for all node pools.
- password str
- Password of account.
- pgw_
endpoint str - The Intranet address used for access.
- pre_
start_ struser_ script - Base64-encoded user script, executed before initializing the node, currently only effective for adding existing nodes.
- project_
id float - Project ID, default value is 0.
- resource_
delete_ Sequence[Kubernetesoptions Cluster Resource Delete Option Args] - The resource deletion policy when the cluster is deleted. Currently, CBS is supported (CBS is retained by default). Only valid when deleting cluster.
- runtime_
version str - Container Runtime version.
- security_
policies Sequence[str] - Access policy.
- service_
cidr str - A network address block of the service. Different from vpc cidr and cidr of other clusters within this vpc. Must be in 10./192.168/172.[16-31] segments.
- Mapping[str, str]
- The tags of the cluster.
- unschedulable float
- Sets whether the joining node participates in the schedule. Default is '0'. Participate in scheduling.
- upgrade_
instances_ boolfollow_ cluster - Indicates whether upgrade all instances when cluster_version change. Default is false.
- user_
name str - User name of account.
- vpc_
cni_ strtype - Distinguish between shared network card multi-IP mode and independent network card mode. Fill in
tke-route-eni
for shared network card multi-IP mode andtke-direct-eni
for independent network card mode. The default is shared network card mode. When it is necessary to turn off the vpc-cni container network capability, botheni_subnet_ids
andvpc_cni_type
must be set to empty. - vpc_
id str - Vpc Id of the cluster.
- worker_
configs Sequence[KubernetesCluster Worker Config Args] - Deploy the machine configuration information of the 'WORKER' service, and create <=20 units for common users. The other 'WORK' service are added by 'tencentcloud_kubernetes_scale_worker'.
- worker_
instances_ Sequence[Kuberneteslists Cluster Worker Instances List Args] - An information list of cvm within the 'WORKER' clusters. Each element contains the following attributes:
- acquire
Cluster BooleanAdmin Role - If set to true, it will acquire the ClusterRole tke:admin. NOTE: this arguments cannot revoke to
false
after acquired. - auth
Options Property Map - Specify cluster authentication configuration. Only available for managed cluster and
cluster_version
>= 1.20. - auto
Upgrade BooleanCluster Level - Whether the cluster level auto upgraded, valid for managed cluster.
- base
Pod NumberNum - The number of basic pods. valid when enable_customized_pod_cidr=true.
- cdc
Id String - CDC ID.
- String
- The certificate used for access.
- claim
Expired NumberSeconds - Claim expired seconds to recycle ENI. This field can only set when field
network_type
is 'VPC-CNI'.claim_expired_seconds
must greater or equal than 300 and less than 15768000. - cluster
As BooleanEnabled - (Deprecated) This argument is deprecated because the TKE auto-scaling group was no longer available. Indicates whether to enable cluster node auto scaling. Default is false.
- cluster
Audit Property Map - Specify Cluster Audit config. NOTE: Please make sure your TKE CamRole have permission to access CLS service.
- cluster
Cidr String - A network address block of the cluster. Different from vpc cidr and cidr of other clusters within this vpc. Must be in 10./192.168/172.[16-31] segments.
- cluster
Deploy StringType - Deployment type of the cluster, the available values include: 'MANAGED_CLUSTER' and 'INDEPENDENT_CLUSTER'. Default is 'MANAGED_CLUSTER'.
- cluster
Desc String - Description of the cluster.
- cluster
External StringEndpoint - External network address to access.
- cluster
Extra Property MapArgs - Customized parameters for master component,such as kube-apiserver, kube-controller-manager, kube-scheduler.
- cluster
Internet Boolean - Open internet access or not. If this field is set 'true', the field below
worker_config
must be set. Because only cluster with node is allowed enable access endpoint. You may open it throughtencentcloud.KubernetesClusterEndpoint
. - cluster
Internet StringDomain - Domain name for cluster Kube-apiserver internet access. Be careful if you modify value of this parameter, the cluster_external_endpoint value may be changed automatically too.
- cluster
Internet StringSecurity Group - Specify security group, NOTE: This argument must not be empty if cluster internet enabled.
- cluster
Intranet Boolean - Open intranet access or not. If this field is set 'true', the field below
worker_config
must be set. Because only cluster with node is allowed enable access endpoint. You may open it throughtencentcloud.KubernetesClusterEndpoint
. - cluster
Intranet StringDomain - Domain name for cluster Kube-apiserver intranet access. Be careful if you modify value of this parameter, the pgw_endpoint value may be changed automatically too.
- cluster
Intranet StringSubnet Id - Subnet id who can access this independent cluster, this field must and can only set when
cluster_intranet
is true.cluster_intranet_subnet_id
can not modify once be set. - cluster
Ipvs Boolean - Indicates whether
ipvs
is enabled. Default is true. False meansiptables
is enabled. - cluster
Level String - Specify cluster level, valid for managed cluster, use data source
tencentcloud.getKubernetesClusterLevels
to query available levels. Available value examplesL5
,L20
,L50
,L100
, etc. - cluster
Max NumberPod Num - The maximum number of Pods per node in the cluster. Default is 256. The minimum value is 4. When its power unequal to 2, it will round upward to the closest power of 2.
- cluster
Max NumberService Num - The maximum number of services in the cluster. Default is 256. The range is from 32 to 32768. When its power unequal to 2, it will round upward to the closest power of 2.
- cluster
Name String - Name of the cluster.
- cluster
Node NumberNum - Number of nodes in the cluster.
- cluster
Os String - Cluster operating system, supports setting public images (the field passes the corresponding image Name) and custom images (the field passes the corresponding image ID). For details, please refer to: https://cloud.tencent.com/document/product/457/68289.
- cluster
Os StringType - Image type of the cluster os, the available values include: 'GENERAL'. Default is 'GENERAL'.
- cluster
Subnet StringId - Subnet ID of the cluster, such as: subnet-b3p7d7q5.
- cluster
Version String - Version of the cluster. Use
tencentcloud.getKubernetesAvailableClusterVersions
to get the upgradable cluster version. - container
Runtime String - Runtime type of the cluster, the available values include: 'docker' and 'containerd'.The Kubernetes v1.24 has removed dockershim, so please use containerd in v1.24 or higher.Default is 'docker'.
- deletion
Protection Boolean - Indicates whether cluster deletion protection is enabled. Default is false.
- docker
Graph StringPath - Docker graph path. Default is
/var/lib/docker
. - domain String
- Domain name for access.
- enable
Customized BooleanPod Cidr - Whether to enable the custom mode of node podCIDR size. Default is false.
- eni
Subnet List<String>Ids - Subnet Ids for cluster with VPC-CNI network mode. This field can only set when field
network_type
is 'VPC-CNI'.eni_subnet_ids
can not empty once be set. - event
Persistence Property Map - Specify cluster Event Persistence config. NOTE: Please make sure your TKE CamRole have permission to access CLS service.
- exist
Instances List<Property Map> - create tke cluster by existed instances.
- extension
Addons List<Property Map> - Information of the add-on to be installed.
- extra
Args List<String> - Custom parameter information related to the node.
- globe
Desired NumberPod Num - Indicate to set desired pod number in node. valid when enable_customized_pod_cidr=true, and it takes effect for all nodes.
- ignore
Cluster BooleanCidr Conflict - Indicates whether to ignore the cluster cidr conflict error. Default is false.
- ignore
Service BooleanCidr Conflict - Indicates whether to ignore the service cidr conflict error. Only valid in
VPC-CNI
mode. - instance
Delete StringMode - The strategy for deleting cluster instances: terminate (destroy instances, only support pay as you go cloud host instances) retain (remove only, keep instances), Default is terminate.
- is
Non BooleanStatic Ip Mode - Indicates whether non-static ip mode is enabled. Default is false.
- kube
Config String - Kubernetes config.
- kube
Config StringIntranet - Kubernetes config of private network.
- kube
Proxy StringMode - Cluster kube-proxy mode, the available values include: 'kube-proxy-bpf'. Default is not set.When set to kube-proxy-bpf, cluster version greater than 1.14 and with Tencent Linux 2.4 is required.
- kubernetes
Cluster StringId - ID of the resource.
- labels Map<String>
- Labels of tke cluster nodes.
- log
Agent Property Map - Specify cluster log agent config.
- managed
Cluster List<String>Internet Security Policies - this argument was deprecated, use
cluster_internet_security_group
instead. Security policies for managed cluster internet, like:'192.168.1.0/24' or '113.116.51.27', '0.0.0.0/0' means all. This field can only set when fieldcluster_deploy_type
is 'MANAGED_CLUSTER' andcluster_internet
is true.managed_cluster_internet_security_policies
can not delete or empty once be set. - master
Configs List<Property Map> - Deploy the machine configuration information of the 'MASTER_ETCD' service, and create <=7 units for common users.
- mount
Target String - Mount target. Default is not mounting.
- network
Type String - Cluster network type, the available values include: 'GR' and 'VPC-CNI' and 'CiliumOverlay'. Default is GR.
- node
Name StringType - Node name type of Cluster, the available values include: 'lan-ip' and 'hostname', Default is 'lan-ip'.
- node
Pool List<Property Map>Global Configs - Global config effective for all node pools.
- password String
- Password of account.
- pgw
Endpoint String - The Intranet address used for access.
- pre
Start StringUser Script - Base64-encoded user script, executed before initializing the node, currently only effective for adding existing nodes.
- project
Id Number - Project ID, default value is 0.
- resource
Delete List<Property Map>Options - The resource deletion policy when the cluster is deleted. Currently, CBS is supported (CBS is retained by default). Only valid when deleting cluster.
- runtime
Version String - Container Runtime version.
- security
Policies List<String> - Access policy.
- service
Cidr String - A network address block of the service. Different from vpc cidr and cidr of other clusters within this vpc. Must be in 10./192.168/172.[16-31] segments.
- Map<String>
- The tags of the cluster.
- unschedulable Number
- Sets whether the joining node participates in the schedule. Default is '0'. Participate in scheduling.
- upgrade
Instances BooleanFollow Cluster - Indicates whether upgrade all instances when cluster_version change. Default is false.
- user
Name String - User name of account.
- vpc
Cni StringType - Distinguish between shared network card multi-IP mode and independent network card mode. Fill in
tke-route-eni
for shared network card multi-IP mode andtke-direct-eni
for independent network card mode. The default is shared network card mode. When it is necessary to turn off the vpc-cni container network capability, botheni_subnet_ids
andvpc_cni_type
must be set to empty. - vpc
Id String - Vpc Id of the cluster.
- worker
Configs List<Property Map> - Deploy the machine configuration information of the 'WORKER' service, and create <=20 units for common users. The other 'WORK' service are added by 'tencentcloud_kubernetes_scale_worker'.
- worker
Instances List<Property Map>Lists - An information list of cvm within the 'WORKER' clusters. Each element contains the following attributes:
Supporting Types
KubernetesClusterAuthOptions, KubernetesClusterAuthOptionsArgs
- Auto
Create boolDiscovery Anonymous Auth - If set to
true
, the rbac rule will be created automatically which allow anonymous user to access '/.well-known/openid-configuration' and '/openid/v1/jwks'. - Issuer string
- Specify service-account-issuer. If use_tke_default is set to
true
, please do not set this field, it will be ignored anyway. - Jwks
Uri string - Specify service-account-jwks-uri. If use_tke_default is set to
true
, please do not set this field, it will be ignored anyway. - Use
Tke boolDefault - If set to
true
, the issuer and jwks_uri will be generated automatically by tke, please do not set issuer and jwks_uri, and they will be ignored.
- Auto
Create boolDiscovery Anonymous Auth - If set to
true
, the rbac rule will be created automatically which allow anonymous user to access '/.well-known/openid-configuration' and '/openid/v1/jwks'. - Issuer string
- Specify service-account-issuer. If use_tke_default is set to
true
, please do not set this field, it will be ignored anyway. - Jwks
Uri string - Specify service-account-jwks-uri. If use_tke_default is set to
true
, please do not set this field, it will be ignored anyway. - Use
Tke boolDefault - If set to
true
, the issuer and jwks_uri will be generated automatically by tke, please do not set issuer and jwks_uri, and they will be ignored.
- auto
Create BooleanDiscovery Anonymous Auth - If set to
true
, the rbac rule will be created automatically which allow anonymous user to access '/.well-known/openid-configuration' and '/openid/v1/jwks'. - issuer String
- Specify service-account-issuer. If use_tke_default is set to
true
, please do not set this field, it will be ignored anyway. - jwks
Uri String - Specify service-account-jwks-uri. If use_tke_default is set to
true
, please do not set this field, it will be ignored anyway. - use
Tke BooleanDefault - If set to
true
, the issuer and jwks_uri will be generated automatically by tke, please do not set issuer and jwks_uri, and they will be ignored.
- auto
Create booleanDiscovery Anonymous Auth - If set to
true
, the rbac rule will be created automatically which allow anonymous user to access '/.well-known/openid-configuration' and '/openid/v1/jwks'. - issuer string
- Specify service-account-issuer. If use_tke_default is set to
true
, please do not set this field, it will be ignored anyway. - jwks
Uri string - Specify service-account-jwks-uri. If use_tke_default is set to
true
, please do not set this field, it will be ignored anyway. - use
Tke booleanDefault - If set to
true
, the issuer and jwks_uri will be generated automatically by tke, please do not set issuer and jwks_uri, and they will be ignored.
- auto_
create_ booldiscovery_ anonymous_ auth - If set to
true
, the rbac rule will be created automatically which allow anonymous user to access '/.well-known/openid-configuration' and '/openid/v1/jwks'. - issuer str
- Specify service-account-issuer. If use_tke_default is set to
true
, please do not set this field, it will be ignored anyway. - jwks_
uri str - Specify service-account-jwks-uri. If use_tke_default is set to
true
, please do not set this field, it will be ignored anyway. - use_
tke_ booldefault - If set to
true
, the issuer and jwks_uri will be generated automatically by tke, please do not set issuer and jwks_uri, and they will be ignored.
- auto
Create BooleanDiscovery Anonymous Auth - If set to
true
, the rbac rule will be created automatically which allow anonymous user to access '/.well-known/openid-configuration' and '/openid/v1/jwks'. - issuer String
- Specify service-account-issuer. If use_tke_default is set to
true
, please do not set this field, it will be ignored anyway. - jwks
Uri String - Specify service-account-jwks-uri. If use_tke_default is set to
true
, please do not set this field, it will be ignored anyway. - use
Tke BooleanDefault - If set to
true
, the issuer and jwks_uri will be generated automatically by tke, please do not set issuer and jwks_uri, and they will be ignored.
KubernetesClusterClusterAudit, KubernetesClusterClusterAuditArgs
- Enabled bool
- Specify weather the Cluster Audit enabled. NOTE: Enable Cluster Audit will also auto install Log Agent.
- Delete
Audit boolLog And Topic - when you want to close the cluster audit log or delete the cluster, you can use this parameter to determine whether the audit log set and topic created by default will be deleted.
- Log
Set stringId - Specify id of existing CLS log set, or auto create a new set by leave it empty.
- Topic
Id string - Specify id of existing CLS log topic, or auto create a new topic by leave it empty.
- Enabled bool
- Specify weather the Cluster Audit enabled. NOTE: Enable Cluster Audit will also auto install Log Agent.
- Delete
Audit boolLog And Topic - when you want to close the cluster audit log or delete the cluster, you can use this parameter to determine whether the audit log set and topic created by default will be deleted.
- Log
Set stringId - Specify id of existing CLS log set, or auto create a new set by leave it empty.
- Topic
Id string - Specify id of existing CLS log topic, or auto create a new topic by leave it empty.
- enabled Boolean
- Specify weather the Cluster Audit enabled. NOTE: Enable Cluster Audit will also auto install Log Agent.
- delete
Audit BooleanLog And Topic - when you want to close the cluster audit log or delete the cluster, you can use this parameter to determine whether the audit log set and topic created by default will be deleted.
- log
Set StringId - Specify id of existing CLS log set, or auto create a new set by leave it empty.
- topic
Id String - Specify id of existing CLS log topic, or auto create a new topic by leave it empty.
- enabled boolean
- Specify weather the Cluster Audit enabled. NOTE: Enable Cluster Audit will also auto install Log Agent.
- delete
Audit booleanLog And Topic - when you want to close the cluster audit log or delete the cluster, you can use this parameter to determine whether the audit log set and topic created by default will be deleted.
- log
Set stringId - Specify id of existing CLS log set, or auto create a new set by leave it empty.
- topic
Id string - Specify id of existing CLS log topic, or auto create a new topic by leave it empty.
- enabled bool
- Specify weather the Cluster Audit enabled. NOTE: Enable Cluster Audit will also auto install Log Agent.
- delete_
audit_ boollog_ and_ topic - when you want to close the cluster audit log or delete the cluster, you can use this parameter to determine whether the audit log set and topic created by default will be deleted.
- log_
set_ strid - Specify id of existing CLS log set, or auto create a new set by leave it empty.
- topic_
id str - Specify id of existing CLS log topic, or auto create a new topic by leave it empty.
- enabled Boolean
- Specify weather the Cluster Audit enabled. NOTE: Enable Cluster Audit will also auto install Log Agent.
- delete
Audit BooleanLog And Topic - when you want to close the cluster audit log or delete the cluster, you can use this parameter to determine whether the audit log set and topic created by default will be deleted.
- log
Set StringId - Specify id of existing CLS log set, or auto create a new set by leave it empty.
- topic
Id String - Specify id of existing CLS log topic, or auto create a new topic by leave it empty.
KubernetesClusterClusterExtraArgs, KubernetesClusterClusterExtraArgsArgs
- Kube
Apiservers List<string> - The customized parameters for kube-apiserver.
- Kube
Controller List<string>Managers - The customized parameters for kube-controller-manager.
- Kube
Schedulers List<string> - The customized parameters for kube-scheduler.
- Kube
Apiservers []string - The customized parameters for kube-apiserver.
- Kube
Controller []stringManagers - The customized parameters for kube-controller-manager.
- Kube
Schedulers []string - The customized parameters for kube-scheduler.
- kube
Apiservers List<String> - The customized parameters for kube-apiserver.
- kube
Controller List<String>Managers - The customized parameters for kube-controller-manager.
- kube
Schedulers List<String> - The customized parameters for kube-scheduler.
- kube
Apiservers string[] - The customized parameters for kube-apiserver.
- kube
Controller string[]Managers - The customized parameters for kube-controller-manager.
- kube
Schedulers string[] - The customized parameters for kube-scheduler.
- kube_
apiservers Sequence[str] - The customized parameters for kube-apiserver.
- kube_
controller_ Sequence[str]managers - The customized parameters for kube-controller-manager.
- kube_
schedulers Sequence[str] - The customized parameters for kube-scheduler.
- kube
Apiservers List<String> - The customized parameters for kube-apiserver.
- kube
Controller List<String>Managers - The customized parameters for kube-controller-manager.
- kube
Schedulers List<String> - The customized parameters for kube-scheduler.
KubernetesClusterEventPersistence, KubernetesClusterEventPersistenceArgs
- Enabled bool
- Specify weather the Event Persistence enabled.
- Delete
Event boolLog And Topic - when you want to close the cluster event persistence or delete the cluster, you can use this parameter to determine whether the event persistence log set and topic created by default will be deleted.
- Log
Set stringId - Specify id of existing CLS log set, or auto create a new set by leave it empty.
- Topic
Id string - Specify id of existing CLS log topic, or auto create a new topic by leave it empty.
- Enabled bool
- Specify weather the Event Persistence enabled.
- Delete
Event boolLog And Topic - when you want to close the cluster event persistence or delete the cluster, you can use this parameter to determine whether the event persistence log set and topic created by default will be deleted.
- Log
Set stringId - Specify id of existing CLS log set, or auto create a new set by leave it empty.
- Topic
Id string - Specify id of existing CLS log topic, or auto create a new topic by leave it empty.
- enabled Boolean
- Specify weather the Event Persistence enabled.
- delete
Event BooleanLog And Topic - when you want to close the cluster event persistence or delete the cluster, you can use this parameter to determine whether the event persistence log set and topic created by default will be deleted.
- log
Set StringId - Specify id of existing CLS log set, or auto create a new set by leave it empty.
- topic
Id String - Specify id of existing CLS log topic, or auto create a new topic by leave it empty.
- enabled boolean
- Specify weather the Event Persistence enabled.
- delete
Event booleanLog And Topic - when you want to close the cluster event persistence or delete the cluster, you can use this parameter to determine whether the event persistence log set and topic created by default will be deleted.
- log
Set stringId - Specify id of existing CLS log set, or auto create a new set by leave it empty.
- topic
Id string - Specify id of existing CLS log topic, or auto create a new topic by leave it empty.
- enabled bool
- Specify weather the Event Persistence enabled.
- delete_
event_ boollog_ and_ topic - when you want to close the cluster event persistence or delete the cluster, you can use this parameter to determine whether the event persistence log set and topic created by default will be deleted.
- log_
set_ strid - Specify id of existing CLS log set, or auto create a new set by leave it empty.
- topic_
id str - Specify id of existing CLS log topic, or auto create a new topic by leave it empty.
- enabled Boolean
- Specify weather the Event Persistence enabled.
- delete
Event BooleanLog And Topic - when you want to close the cluster event persistence or delete the cluster, you can use this parameter to determine whether the event persistence log set and topic created by default will be deleted.
- log
Set StringId - Specify id of existing CLS log set, or auto create a new set by leave it empty.
- topic
Id String - Specify id of existing CLS log topic, or auto create a new topic by leave it empty.
KubernetesClusterExistInstance, KubernetesClusterExistInstanceArgs
- Desired
Pod List<double>Numbers - Custom mode cluster, you can specify the number of pods for each node. corresponding to the existed_instances_para.instance_ids parameter.
- Instances
Para KubernetesCluster Exist Instance Instances Para - Reinstallation parameters of an existing instance.
- Node
Role string - Role of existed node. value:MASTER_ETCD or WORKER.
- Desired
Pod []float64Numbers - Custom mode cluster, you can specify the number of pods for each node. corresponding to the existed_instances_para.instance_ids parameter.
- Instances
Para KubernetesCluster Exist Instance Instances Para - Reinstallation parameters of an existing instance.
- Node
Role string - Role of existed node. value:MASTER_ETCD or WORKER.
- desired
Pod List<Double>Numbers - Custom mode cluster, you can specify the number of pods for each node. corresponding to the existed_instances_para.instance_ids parameter.
- instances
Para KubernetesCluster Exist Instance Instances Para - Reinstallation parameters of an existing instance.
- node
Role String - Role of existed node. value:MASTER_ETCD or WORKER.
- desired
Pod number[]Numbers - Custom mode cluster, you can specify the number of pods for each node. corresponding to the existed_instances_para.instance_ids parameter.
- instances
Para KubernetesCluster Exist Instance Instances Para - Reinstallation parameters of an existing instance.
- node
Role string - Role of existed node. value:MASTER_ETCD or WORKER.
- desired_
pod_ Sequence[float]numbers - Custom mode cluster, you can specify the number of pods for each node. corresponding to the existed_instances_para.instance_ids parameter.
- instances_
para KubernetesCluster Exist Instance Instances Para - Reinstallation parameters of an existing instance.
- node_
role str - Role of existed node. value:MASTER_ETCD or WORKER.
- desired
Pod List<Number>Numbers - Custom mode cluster, you can specify the number of pods for each node. corresponding to the existed_instances_para.instance_ids parameter.
- instances
Para Property Map - Reinstallation parameters of an existing instance.
- node
Role String - Role of existed node. value:MASTER_ETCD or WORKER.
KubernetesClusterExistInstanceInstancesPara, KubernetesClusterExistInstanceInstancesParaArgs
- Instance
Ids List<string> - Cluster IDs.
- Enhanced
Monitor boolService - To specify whether to enable cloud monitor service. Default is TRUE.
- Enhanced
Security boolService - To specify whether to enable cloud security service. Default is TRUE.
- Key
Ids List<string> - ID list of keys, should be set if
password
not set. - Master
Config KubernetesCluster Exist Instance Instances Para Master Config - Advanced Node Settings. commonly used to attach existing instances.
- Password string
- Password to access, should be set if
key_ids
not set. - Security
Group List<string>Ids - Security groups to which a CVM instance belongs.
- Instance
Ids []string - Cluster IDs.
- Enhanced
Monitor boolService - To specify whether to enable cloud monitor service. Default is TRUE.
- Enhanced
Security boolService - To specify whether to enable cloud security service. Default is TRUE.
- Key
Ids []string - ID list of keys, should be set if
password
not set. - Master
Config KubernetesCluster Exist Instance Instances Para Master Config - Advanced Node Settings. commonly used to attach existing instances.
- Password string
- Password to access, should be set if
key_ids
not set. - Security
Group []stringIds - Security groups to which a CVM instance belongs.
- instance
Ids List<String> - Cluster IDs.
- enhanced
Monitor BooleanService - To specify whether to enable cloud monitor service. Default is TRUE.
- enhanced
Security BooleanService - To specify whether to enable cloud security service. Default is TRUE.
- key
Ids List<String> - ID list of keys, should be set if
password
not set. - master
Config KubernetesCluster Exist Instance Instances Para Master Config - Advanced Node Settings. commonly used to attach existing instances.
- password String
- Password to access, should be set if
key_ids
not set. - security
Group List<String>Ids - Security groups to which a CVM instance belongs.
- instance
Ids string[] - Cluster IDs.
- enhanced
Monitor booleanService - To specify whether to enable cloud monitor service. Default is TRUE.
- enhanced
Security booleanService - To specify whether to enable cloud security service. Default is TRUE.
- key
Ids string[] - ID list of keys, should be set if
password
not set. - master
Config KubernetesCluster Exist Instance Instances Para Master Config - Advanced Node Settings. commonly used to attach existing instances.
- password string
- Password to access, should be set if
key_ids
not set. - security
Group string[]Ids - Security groups to which a CVM instance belongs.
- instance_
ids Sequence[str] - Cluster IDs.
- enhanced_
monitor_ boolservice - To specify whether to enable cloud monitor service. Default is TRUE.
- enhanced_
security_ boolservice - To specify whether to enable cloud security service. Default is TRUE.
- key_
ids Sequence[str] - ID list of keys, should be set if
password
not set. - master_
config KubernetesCluster Exist Instance Instances Para Master Config - Advanced Node Settings. commonly used to attach existing instances.
- password str
- Password to access, should be set if
key_ids
not set. - security_
group_ Sequence[str]ids - Security groups to which a CVM instance belongs.
- instance
Ids List<String> - Cluster IDs.
- enhanced
Monitor BooleanService - To specify whether to enable cloud monitor service. Default is TRUE.
- enhanced
Security BooleanService - To specify whether to enable cloud security service. Default is TRUE.
- key
Ids List<String> - ID list of keys, should be set if
password
not set. - master
Config Property Map - Advanced Node Settings. commonly used to attach existing instances.
- password String
- Password to access, should be set if
key_ids
not set. - security
Group List<String>Ids - Security groups to which a CVM instance belongs.
KubernetesClusterExistInstanceInstancesParaMasterConfig, KubernetesClusterExistInstanceInstancesParaMasterConfigArgs
- Data
Disk KubernetesCluster Exist Instance Instances Para Master Config Data Disk - Configurations of data disk.
- Desired
Pod doubleNumber - Indicate to set desired pod number in node. valid when the cluster is podCIDR.
- Docker
Graph stringPath - Docker graph path. Default is
/var/lib/docker
. - Extra
Args KubernetesCluster Exist Instance Instances Para Master Config Extra Args - Custom parameter information related to the node. This is a white-list parameter.
- Gpu
Args KubernetesCluster Exist Instance Instances Para Master Config Gpu Args - GPU driver parameters.
- Labels
List<Kubernetes
Cluster Exist Instance Instances Para Master Config Label> - Node label list.
- Mount
Target string - Mount target. Default is not mounting.
- Taints
List<Kubernetes
Cluster Exist Instance Instances Para Master Config Taint> - Node taint.
- Unschedulable double
- Set whether the joined nodes participate in scheduling, with a default value of 0, indicating participation in scheduling; Non 0 means not participating in scheduling.
- User
Script string - User script encoded in base64, which will be executed after the k8s component runs. The user needs to ensure the script's reentrant and retry logic. The script and its generated log files can be viewed in the node path /data/ccs_userscript/. If the node needs to be initialized before joining the schedule, it can be used in conjunction with the
unschedulable
parameter. After the final initialization of the userScript is completed, add the command "kubectl uncordon nodename --kubeconfig=/root/.kube/config" to add the node to the schedule.
- Data
Disk KubernetesCluster Exist Instance Instances Para Master Config Data Disk - Configurations of data disk.
- Desired
Pod float64Number - Indicate to set desired pod number in node. valid when the cluster is podCIDR.
- Docker
Graph stringPath - Docker graph path. Default is
/var/lib/docker
. - Extra
Args KubernetesCluster Exist Instance Instances Para Master Config Extra Args - Custom parameter information related to the node. This is a white-list parameter.
- Gpu
Args KubernetesCluster Exist Instance Instances Para Master Config Gpu Args - GPU driver parameters.
- Labels
[]Kubernetes
Cluster Exist Instance Instances Para Master Config Label - Node label list.
- Mount
Target string - Mount target. Default is not mounting.
- Taints
[]Kubernetes
Cluster Exist Instance Instances Para Master Config Taint - Node taint.
- Unschedulable float64
- Set whether the joined nodes participate in scheduling, with a default value of 0, indicating participation in scheduling; Non 0 means not participating in scheduling.
- User
Script string - User script encoded in base64, which will be executed after the k8s component runs. The user needs to ensure the script's reentrant and retry logic. The script and its generated log files can be viewed in the node path /data/ccs_userscript/. If the node needs to be initialized before joining the schedule, it can be used in conjunction with the
unschedulable
parameter. After the final initialization of the userScript is completed, add the command "kubectl uncordon nodename --kubeconfig=/root/.kube/config" to add the node to the schedule.
- data
Disk KubernetesCluster Exist Instance Instances Para Master Config Data Disk - Configurations of data disk.
- desired
Pod DoubleNumber - Indicate to set desired pod number in node. valid when the cluster is podCIDR.
- docker
Graph StringPath - Docker graph path. Default is
/var/lib/docker
. - extra
Args KubernetesCluster Exist Instance Instances Para Master Config Extra Args - Custom parameter information related to the node. This is a white-list parameter.
- gpu
Args KubernetesCluster Exist Instance Instances Para Master Config Gpu Args - GPU driver parameters.
- labels
List<Kubernetes
Cluster Exist Instance Instances Para Master Config Label> - Node label list.
- mount
Target String - Mount target. Default is not mounting.
- taints
List<Kubernetes
Cluster Exist Instance Instances Para Master Config Taint> - Node taint.
- unschedulable Double
- Set whether the joined nodes participate in scheduling, with a default value of 0, indicating participation in scheduling; Non 0 means not participating in scheduling.
- user
Script String - User script encoded in base64, which will be executed after the k8s component runs. The user needs to ensure the script's reentrant and retry logic. The script and its generated log files can be viewed in the node path /data/ccs_userscript/. If the node needs to be initialized before joining the schedule, it can be used in conjunction with the
unschedulable
parameter. After the final initialization of the userScript is completed, add the command "kubectl uncordon nodename --kubeconfig=/root/.kube/config" to add the node to the schedule.
- data
Disk KubernetesCluster Exist Instance Instances Para Master Config Data Disk - Configurations of data disk.
- desired
Pod numberNumber - Indicate to set desired pod number in node. valid when the cluster is podCIDR.
- docker
Graph stringPath - Docker graph path. Default is
/var/lib/docker
. - extra
Args KubernetesCluster Exist Instance Instances Para Master Config Extra Args - Custom parameter information related to the node. This is a white-list parameter.
- gpu
Args KubernetesCluster Exist Instance Instances Para Master Config Gpu Args - GPU driver parameters.
- labels
Kubernetes
Cluster Exist Instance Instances Para Master Config Label[] - Node label list.
- mount
Target string - Mount target. Default is not mounting.
- taints
Kubernetes
Cluster Exist Instance Instances Para Master Config Taint[] - Node taint.
- unschedulable number
- Set whether the joined nodes participate in scheduling, with a default value of 0, indicating participation in scheduling; Non 0 means not participating in scheduling.
- user
Script string - User script encoded in base64, which will be executed after the k8s component runs. The user needs to ensure the script's reentrant and retry logic. The script and its generated log files can be viewed in the node path /data/ccs_userscript/. If the node needs to be initialized before joining the schedule, it can be used in conjunction with the
unschedulable
parameter. After the final initialization of the userScript is completed, add the command "kubectl uncordon nodename --kubeconfig=/root/.kube/config" to add the node to the schedule.
- data_
disk KubernetesCluster Exist Instance Instances Para Master Config Data Disk - Configurations of data disk.
- desired_
pod_ floatnumber - Indicate to set desired pod number in node. valid when the cluster is podCIDR.
- docker_
graph_ strpath - Docker graph path. Default is
/var/lib/docker
. - extra_
args KubernetesCluster Exist Instance Instances Para Master Config Extra Args - Custom parameter information related to the node. This is a white-list parameter.
- gpu_
args KubernetesCluster Exist Instance Instances Para Master Config Gpu Args - GPU driver parameters.
- labels
Sequence[Kubernetes
Cluster Exist Instance Instances Para Master Config Label] - Node label list.
- mount_
target str - Mount target. Default is not mounting.
- taints
Sequence[Kubernetes
Cluster Exist Instance Instances Para Master Config Taint] - Node taint.
- unschedulable float
- Set whether the joined nodes participate in scheduling, with a default value of 0, indicating participation in scheduling; Non 0 means not participating in scheduling.
- user_
script str - User script encoded in base64, which will be executed after the k8s component runs. The user needs to ensure the script's reentrant and retry logic. The script and its generated log files can be viewed in the node path /data/ccs_userscript/. If the node needs to be initialized before joining the schedule, it can be used in conjunction with the
unschedulable
parameter. After the final initialization of the userScript is completed, add the command "kubectl uncordon nodename --kubeconfig=/root/.kube/config" to add the node to the schedule.
- data
Disk Property Map - Configurations of data disk.
- desired
Pod NumberNumber - Indicate to set desired pod number in node. valid when the cluster is podCIDR.
- docker
Graph StringPath - Docker graph path. Default is
/var/lib/docker
. - extra
Args Property Map - Custom parameter information related to the node. This is a white-list parameter.
- gpu
Args Property Map - GPU driver parameters.
- labels List<Property Map>
- Node label list.
- mount
Target String - Mount target. Default is not mounting.
- taints List<Property Map>
- Node taint.
- unschedulable Number
- Set whether the joined nodes participate in scheduling, with a default value of 0, indicating participation in scheduling; Non 0 means not participating in scheduling.
- user
Script String - User script encoded in base64, which will be executed after the k8s component runs. The user needs to ensure the script's reentrant and retry logic. The script and its generated log files can be viewed in the node path /data/ccs_userscript/. If the node needs to be initialized before joining the schedule, it can be used in conjunction with the
unschedulable
parameter. After the final initialization of the userScript is completed, add the command "kubectl uncordon nodename --kubeconfig=/root/.kube/config" to add the node to the schedule.
KubernetesClusterExistInstanceInstancesParaMasterConfigDataDisk, KubernetesClusterExistInstanceInstancesParaMasterConfigDataDiskArgs
- Auto
Format boolAnd Mount - Indicate whether to auto format and mount or not. Default is
false
. - Disk
Partition string - The name of the device or partition to mount.
- Disk
Size double - Volume of disk in GB. Default is
0
. - Disk
Type string - Types of disk, available values:
CLOUD_PREMIUM
andCLOUD_SSD
andCLOUD_HSSD
andCLOUD_TSSD
. - File
System string - File system, e.g.
ext3/ext4/xfs
. - Mount
Target string - Mount target.
- Auto
Format boolAnd Mount - Indicate whether to auto format and mount or not. Default is
false
. - Disk
Partition string - The name of the device or partition to mount.
- Disk
Size float64 - Volume of disk in GB. Default is
0
. - Disk
Type string - Types of disk, available values:
CLOUD_PREMIUM
andCLOUD_SSD
andCLOUD_HSSD
andCLOUD_TSSD
. - File
System string - File system, e.g.
ext3/ext4/xfs
. - Mount
Target string - Mount target.
- auto
Format BooleanAnd Mount - Indicate whether to auto format and mount or not. Default is
false
. - disk
Partition String - The name of the device or partition to mount.
- disk
Size Double - Volume of disk in GB. Default is
0
. - disk
Type String - Types of disk, available values:
CLOUD_PREMIUM
andCLOUD_SSD
andCLOUD_HSSD
andCLOUD_TSSD
. - file
System String - File system, e.g.
ext3/ext4/xfs
. - mount
Target String - Mount target.
- auto
Format booleanAnd Mount - Indicate whether to auto format and mount or not. Default is
false
. - disk
Partition string - The name of the device or partition to mount.
- disk
Size number - Volume of disk in GB. Default is
0
. - disk
Type string - Types of disk, available values:
CLOUD_PREMIUM
andCLOUD_SSD
andCLOUD_HSSD
andCLOUD_TSSD
. - file
System string - File system, e.g.
ext3/ext4/xfs
. - mount
Target string - Mount target.
- auto_
format_ booland_ mount - Indicate whether to auto format and mount or not. Default is
false
. - disk_
partition str - The name of the device or partition to mount.
- disk_
size float - Volume of disk in GB. Default is
0
. - disk_
type str - Types of disk, available values:
CLOUD_PREMIUM
andCLOUD_SSD
andCLOUD_HSSD
andCLOUD_TSSD
. - file_
system str - File system, e.g.
ext3/ext4/xfs
. - mount_
target str - Mount target.
- auto
Format BooleanAnd Mount - Indicate whether to auto format and mount or not. Default is
false
. - disk
Partition String - The name of the device or partition to mount.
- disk
Size Number - Volume of disk in GB. Default is
0
. - disk
Type String - Types of disk, available values:
CLOUD_PREMIUM
andCLOUD_SSD
andCLOUD_HSSD
andCLOUD_TSSD
. - file
System String - File system, e.g.
ext3/ext4/xfs
. - mount
Target String - Mount target.
KubernetesClusterExistInstanceInstancesParaMasterConfigExtraArgs, KubernetesClusterExistInstanceInstancesParaMasterConfigExtraArgsArgs
- Kubelets List<string>
- Kubelet custom parameter. The parameter format is ["k1=v1", "k1=v2"].
- Kubelets []string
- Kubelet custom parameter. The parameter format is ["k1=v1", "k1=v2"].
- kubelets List<String>
- Kubelet custom parameter. The parameter format is ["k1=v1", "k1=v2"].
- kubelets string[]
- Kubelet custom parameter. The parameter format is ["k1=v1", "k1=v2"].
- kubelets Sequence[str]
- Kubelet custom parameter. The parameter format is ["k1=v1", "k1=v2"].
- kubelets List<String>
- Kubelet custom parameter. The parameter format is ["k1=v1", "k1=v2"].
KubernetesClusterExistInstanceInstancesParaMasterConfigGpuArgs, KubernetesClusterExistInstanceInstancesParaMasterConfigGpuArgsArgs
- Cuda Dictionary<string, string>
- CUDA version. Format like:
{ version: String, name: String }
.version
: Version of GPU driver or CUDA;name
: Name of GPU driver or CUDA. - Cudnn Dictionary<string, string>
- cuDNN version. Format like:
{ version: String, name: String, doc_name: String, dev_name: String }
.version
: cuDNN version;name
: cuDNN name;doc_name
: Doc name of cuDNN;dev_name
: Dev name of cuDNN. - Custom
Driver Dictionary<string, string> - Custom GPU driver. Format like:
{address: String}
.address
: URL of custom GPU driver address. - Driver Dictionary<string, string>
- GPU driver version. Format like:
{ version: String, name: String }
.version
: Version of GPU driver or CUDA;name
: Name of GPU driver or CUDA. - Mig
Enable bool - Whether to enable MIG.
- Cuda map[string]string
- CUDA version. Format like:
{ version: String, name: String }
.version
: Version of GPU driver or CUDA;name
: Name of GPU driver or CUDA. - Cudnn map[string]string
- cuDNN version. Format like:
{ version: String, name: String, doc_name: String, dev_name: String }
.version
: cuDNN version;name
: cuDNN name;doc_name
: Doc name of cuDNN;dev_name
: Dev name of cuDNN. - Custom
Driver map[string]string - Custom GPU driver. Format like:
{address: String}
.address
: URL of custom GPU driver address. - Driver map[string]string
- GPU driver version. Format like:
{ version: String, name: String }
.version
: Version of GPU driver or CUDA;name
: Name of GPU driver or CUDA. - Mig
Enable bool - Whether to enable MIG.
- cuda Map<String,String>
- CUDA version. Format like:
{ version: String, name: String }
.version
: Version of GPU driver or CUDA;name
: Name of GPU driver or CUDA. - cudnn Map<String,String>
- cuDNN version. Format like:
{ version: String, name: String, doc_name: String, dev_name: String }
.version
: cuDNN version;name
: cuDNN name;doc_name
: Doc name of cuDNN;dev_name
: Dev name of cuDNN. - custom
Driver Map<String,String> - Custom GPU driver. Format like:
{address: String}
.address
: URL of custom GPU driver address. - driver Map<String,String>
- GPU driver version. Format like:
{ version: String, name: String }
.version
: Version of GPU driver or CUDA;name
: Name of GPU driver or CUDA. - mig
Enable Boolean - Whether to enable MIG.
- cuda {[key: string]: string}
- CUDA version. Format like:
{ version: String, name: String }
.version
: Version of GPU driver or CUDA;name
: Name of GPU driver or CUDA. - cudnn {[key: string]: string}
- cuDNN version. Format like:
{ version: String, name: String, doc_name: String, dev_name: String }
.version
: cuDNN version;name
: cuDNN name;doc_name
: Doc name of cuDNN;dev_name
: Dev name of cuDNN. - custom
Driver {[key: string]: string} - Custom GPU driver. Format like:
{address: String}
.address
: URL of custom GPU driver address. - driver {[key: string]: string}
- GPU driver version. Format like:
{ version: String, name: String }
.version
: Version of GPU driver or CUDA;name
: Name of GPU driver or CUDA. - mig
Enable boolean - Whether to enable MIG.
- cuda Mapping[str, str]
- CUDA version. Format like:
{ version: String, name: String }
.version
: Version of GPU driver or CUDA;name
: Name of GPU driver or CUDA. - cudnn Mapping[str, str]
- cuDNN version. Format like:
{ version: String, name: String, doc_name: String, dev_name: String }
.version
: cuDNN version;name
: cuDNN name;doc_name
: Doc name of cuDNN;dev_name
: Dev name of cuDNN. - custom_
driver Mapping[str, str] - Custom GPU driver. Format like:
{address: String}
.address
: URL of custom GPU driver address. - driver Mapping[str, str]
- GPU driver version. Format like:
{ version: String, name: String }
.version
: Version of GPU driver or CUDA;name
: Name of GPU driver or CUDA. - mig_
enable bool - Whether to enable MIG.
- cuda Map<String>
- CUDA version. Format like:
{ version: String, name: String }
.version
: Version of GPU driver or CUDA;name
: Name of GPU driver or CUDA. - cudnn Map<String>
- cuDNN version. Format like:
{ version: String, name: String, doc_name: String, dev_name: String }
.version
: cuDNN version;name
: cuDNN name;doc_name
: Doc name of cuDNN;dev_name
: Dev name of cuDNN. - custom
Driver Map<String> - Custom GPU driver. Format like:
{address: String}
.address
: URL of custom GPU driver address. - driver Map<String>
- GPU driver version. Format like:
{ version: String, name: String }
.version
: Version of GPU driver or CUDA;name
: Name of GPU driver or CUDA. - mig
Enable Boolean - Whether to enable MIG.
KubernetesClusterExistInstanceInstancesParaMasterConfigLabel, KubernetesClusterExistInstanceInstancesParaMasterConfigLabelArgs
KubernetesClusterExistInstanceInstancesParaMasterConfigTaint, KubernetesClusterExistInstanceInstancesParaMasterConfigTaintArgs
KubernetesClusterExtensionAddon, KubernetesClusterExtensionAddonArgs
KubernetesClusterLogAgent, KubernetesClusterLogAgentArgs
- Enabled bool
- Whether the log agent enabled.
- Kubelet
Root stringDir - Kubelet root directory as the literal.
- Enabled bool
- Whether the log agent enabled.
- Kubelet
Root stringDir - Kubelet root directory as the literal.
- enabled Boolean
- Whether the log agent enabled.
- kubelet
Root StringDir - Kubelet root directory as the literal.
- enabled boolean
- Whether the log agent enabled.
- kubelet
Root stringDir - Kubelet root directory as the literal.
- enabled bool
- Whether the log agent enabled.
- kubelet_
root_ strdir - Kubelet root directory as the literal.
- enabled Boolean
- Whether the log agent enabled.
- kubelet
Root StringDir - Kubelet root directory as the literal.
KubernetesClusterMasterConfig, KubernetesClusterMasterConfigArgs
- Instance
Type string - Specified types of CVM instance.
- Subnet
Id string - Private network ID.
- Availability
Zone string - Indicates which availability zone will be used.
- Bandwidth
Package stringId - bandwidth package id. if user is standard user, then the bandwidth_package_id is needed, or default has bandwidth_package_id.
- Cam
Role stringName - CAM role name authorized to access.
- Count double
- Number of cvm.
- Data
Disks List<KubernetesCluster Master Config Data Disk> - Configurations of data disk.
- Desired
Pod doubleNum - Indicate to set desired pod number in node. valid when enable_customized_pod_cidr=true, and it override
[globe_]desired_pod_num
for current node. Either all the fieldsdesired_pod_num
or none. - Disaster
Recover List<string>Group Ids - Disaster recover groups to which a CVM instance belongs. Only support maximum 1.
- Enhanced
Monitor boolService - To specify whether to enable cloud monitor service. Default is TRUE.
- Enhanced
Security boolService - To specify whether to enable cloud security service. Default is TRUE.
- Hostname string
- The host name of the attached instance. Dot (.) and dash (-) cannot be used as the first and last characters of HostName and cannot be used consecutively. Windows example: The length of the name character is [2, 15], letters (capitalization is not restricted), numbers and dashes (-) are allowed, dots (.) are not supported, and not all numbers are allowed. Examples of other types (Linux, etc.): The character length is [2, 60], and multiple dots are allowed. There is a segment between the dots. Each segment allows letters (with no limitation on capitalization), numbers and dashes (-).
- Hpc
Cluster stringId - Id of cvm hpc cluster.
- Img
Id string - The valid image id, format of img-xxx. Note:
img_id
will be replaced with the image corresponding to TKEcluster_os
. - Instance
Charge stringType - The charge type of instance. Valid values are
PREPAID
andPOSTPAID_BY_HOUR
. The default isPOSTPAID_BY_HOUR
. Note: TencentCloud International only supportsPOSTPAID_BY_HOUR
,PREPAID
instance will not terminated after cluster deleted, and may not allow to delete before expired. - Instance
Charge doubleType Prepaid Period - The tenancy (time unit is month) of the prepaid instance. NOTE: it only works when instance_charge_type is set to
PREPAID
. Valid values are1
,2
,3
,4
,5
,6
,7
,8
,9
,10
,11
,12
,24
,36
. - Instance
Charge stringType Prepaid Renew Flag - Auto renewal flag. Valid values:
NOTIFY_AND_AUTO_RENEW
: notify upon expiration and renew automatically,NOTIFY_AND_MANUAL_RENEW
: notify upon expiration but do not renew automatically,DISABLE_NOTIFY_AND_MANUAL_RENEW
: neither notify upon expiration nor renew automatically. Default value:NOTIFY_AND_MANUAL_RENEW
. If this parameter is specified asNOTIFY_AND_AUTO_RENEW
, the instance will be automatically renewed on a monthly basis if the account balance is sufficient. NOTE: it only works when instance_charge_type is set toPREPAID
. - Instance
Name string - Name of the CVMs.
- Internet
Charge stringType - Charge types for network traffic. Available values include
TRAFFIC_POSTPAID_BY_HOUR
. - Internet
Max doubleBandwidth Out - Max bandwidth of Internet access in Mbps. Default is 0.
- Key
Ids List<string> - ID list of keys, should be set if
password
not set. - Password string
- Password to access, should be set if
key_ids
not set. - Public
Ip boolAssigned - Specify whether to assign an Internet IP address.
- Security
Group List<string>Ids - Security groups to which a CVM instance belongs.
- System
Disk doubleSize - Volume of system disk in GB. Default is
50
. - System
Disk stringType - System disk type. For more information on limits of system disk types, see Storage Overview. Valid values:
LOCAL_BASIC
: local disk,LOCAL_SSD
: local SSD disk,CLOUD_SSD
: SSD,CLOUD_PREMIUM
: Premium Cloud Storage. NOTE:CLOUD_BASIC
,LOCAL_BASIC
andLOCAL_SSD
are deprecated. - User
Data string - ase64-encoded User Data text, the length limit is 16KB.
- Instance
Type string - Specified types of CVM instance.
- Subnet
Id string - Private network ID.
- Availability
Zone string - Indicates which availability zone will be used.
- Bandwidth
Package stringId - bandwidth package id. if user is standard user, then the bandwidth_package_id is needed, or default has bandwidth_package_id.
- Cam
Role stringName - CAM role name authorized to access.
- Count float64
- Number of cvm.
- Data
Disks []KubernetesCluster Master Config Data Disk - Configurations of data disk.
- Desired
Pod float64Num - Indicate to set desired pod number in node. valid when enable_customized_pod_cidr=true, and it override
[globe_]desired_pod_num
for current node. Either all the fieldsdesired_pod_num
or none. - Disaster
Recover []stringGroup Ids - Disaster recover groups to which a CVM instance belongs. Only support maximum 1.
- Enhanced
Monitor boolService - To specify whether to enable cloud monitor service. Default is TRUE.
- Enhanced
Security boolService - To specify whether to enable cloud security service. Default is TRUE.
- Hostname string
- The host name of the attached instance. Dot (.) and dash (-) cannot be used as the first and last characters of HostName and cannot be used consecutively. Windows example: The length of the name character is [2, 15], letters (capitalization is not restricted), numbers and dashes (-) are allowed, dots (.) are not supported, and not all numbers are allowed. Examples of other types (Linux, etc.): The character length is [2, 60], and multiple dots are allowed. There is a segment between the dots. Each segment allows letters (with no limitation on capitalization), numbers and dashes (-).
- Hpc
Cluster stringId - Id of cvm hpc cluster.
- Img
Id string - The valid image id, format of img-xxx. Note:
img_id
will be replaced with the image corresponding to TKEcluster_os
. - Instance
Charge stringType - The charge type of instance. Valid values are
PREPAID
andPOSTPAID_BY_HOUR
. The default isPOSTPAID_BY_HOUR
. Note: TencentCloud International only supportsPOSTPAID_BY_HOUR
,PREPAID
instance will not terminated after cluster deleted, and may not allow to delete before expired. - Instance
Charge float64Type Prepaid Period - The tenancy (time unit is month) of the prepaid instance. NOTE: it only works when instance_charge_type is set to
PREPAID
. Valid values are1
,2
,3
,4
,5
,6
,7
,8
,9
,10
,11
,12
,24
,36
. - Instance
Charge stringType Prepaid Renew Flag - Auto renewal flag. Valid values:
NOTIFY_AND_AUTO_RENEW
: notify upon expiration and renew automatically,NOTIFY_AND_MANUAL_RENEW
: notify upon expiration but do not renew automatically,DISABLE_NOTIFY_AND_MANUAL_RENEW
: neither notify upon expiration nor renew automatically. Default value:NOTIFY_AND_MANUAL_RENEW
. If this parameter is specified asNOTIFY_AND_AUTO_RENEW
, the instance will be automatically renewed on a monthly basis if the account balance is sufficient. NOTE: it only works when instance_charge_type is set toPREPAID
. - Instance
Name string - Name of the CVMs.
- Internet
Charge stringType - Charge types for network traffic. Available values include
TRAFFIC_POSTPAID_BY_HOUR
. - Internet
Max float64Bandwidth Out - Max bandwidth of Internet access in Mbps. Default is 0.
- Key
Ids []string - ID list of keys, should be set if
password
not set. - Password string
- Password to access, should be set if
key_ids
not set. - Public
Ip boolAssigned - Specify whether to assign an Internet IP address.
- Security
Group []stringIds - Security groups to which a CVM instance belongs.
- System
Disk float64Size - Volume of system disk in GB. Default is
50
. - System
Disk stringType - System disk type. For more information on limits of system disk types, see Storage Overview. Valid values:
LOCAL_BASIC
: local disk,LOCAL_SSD
: local SSD disk,CLOUD_SSD
: SSD,CLOUD_PREMIUM
: Premium Cloud Storage. NOTE:CLOUD_BASIC
,LOCAL_BASIC
andLOCAL_SSD
are deprecated. - User
Data string - ase64-encoded User Data text, the length limit is 16KB.
- instance
Type String - Specified types of CVM instance.
- subnet
Id String - Private network ID.
- availability
Zone String - Indicates which availability zone will be used.
- bandwidth
Package StringId - bandwidth package id. if user is standard user, then the bandwidth_package_id is needed, or default has bandwidth_package_id.
- cam
Role StringName - CAM role name authorized to access.
- count Double
- Number of cvm.
- data
Disks List<KubernetesCluster Master Config Data Disk> - Configurations of data disk.
- desired
Pod DoubleNum - Indicate to set desired pod number in node. valid when enable_customized_pod_cidr=true, and it override
[globe_]desired_pod_num
for current node. Either all the fieldsdesired_pod_num
or none. - disaster
Recover List<String>Group Ids - Disaster recover groups to which a CVM instance belongs. Only support maximum 1.
- enhanced
Monitor BooleanService - To specify whether to enable cloud monitor service. Default is TRUE.
- enhanced
Security BooleanService - To specify whether to enable cloud security service. Default is TRUE.
- hostname String
- The host name of the attached instance. Dot (.) and dash (-) cannot be used as the first and last characters of HostName and cannot be used consecutively. Windows example: The length of the name character is [2, 15], letters (capitalization is not restricted), numbers and dashes (-) are allowed, dots (.) are not supported, and not all numbers are allowed. Examples of other types (Linux, etc.): The character length is [2, 60], and multiple dots are allowed. There is a segment between the dots. Each segment allows letters (with no limitation on capitalization), numbers and dashes (-).
- hpc
Cluster StringId - Id of cvm hpc cluster.
- img
Id String - The valid image id, format of img-xxx. Note:
img_id
will be replaced with the image corresponding to TKEcluster_os
. - instance
Charge StringType - The charge type of instance. Valid values are
PREPAID
andPOSTPAID_BY_HOUR
. The default isPOSTPAID_BY_HOUR
. Note: TencentCloud International only supportsPOSTPAID_BY_HOUR
,PREPAID
instance will not terminated after cluster deleted, and may not allow to delete before expired. - instance
Charge DoubleType Prepaid Period - The tenancy (time unit is month) of the prepaid instance. NOTE: it only works when instance_charge_type is set to
PREPAID
. Valid values are1
,2
,3
,4
,5
,6
,7
,8
,9
,10
,11
,12
,24
,36
. - instance
Charge StringType Prepaid Renew Flag - Auto renewal flag. Valid values:
NOTIFY_AND_AUTO_RENEW
: notify upon expiration and renew automatically,NOTIFY_AND_MANUAL_RENEW
: notify upon expiration but do not renew automatically,DISABLE_NOTIFY_AND_MANUAL_RENEW
: neither notify upon expiration nor renew automatically. Default value:NOTIFY_AND_MANUAL_RENEW
. If this parameter is specified asNOTIFY_AND_AUTO_RENEW
, the instance will be automatically renewed on a monthly basis if the account balance is sufficient. NOTE: it only works when instance_charge_type is set toPREPAID
. - instance
Name String - Name of the CVMs.
- internet
Charge StringType - Charge types for network traffic. Available values include
TRAFFIC_POSTPAID_BY_HOUR
. - internet
Max DoubleBandwidth Out - Max bandwidth of Internet access in Mbps. Default is 0.
- key
Ids List<String> - ID list of keys, should be set if
password
not set. - password String
- Password to access, should be set if
key_ids
not set. - public
Ip BooleanAssigned - Specify whether to assign an Internet IP address.
- security
Group List<String>Ids - Security groups to which a CVM instance belongs.
- system
Disk DoubleSize - Volume of system disk in GB. Default is
50
. - system
Disk StringType - System disk type. For more information on limits of system disk types, see Storage Overview. Valid values:
LOCAL_BASIC
: local disk,LOCAL_SSD
: local SSD disk,CLOUD_SSD
: SSD,CLOUD_PREMIUM
: Premium Cloud Storage. NOTE:CLOUD_BASIC
,LOCAL_BASIC
andLOCAL_SSD
are deprecated. - user
Data String - ase64-encoded User Data text, the length limit is 16KB.
- instance
Type string - Specified types of CVM instance.
- subnet
Id string - Private network ID.
- availability
Zone string - Indicates which availability zone will be used.
- bandwidth
Package stringId - bandwidth package id. if user is standard user, then the bandwidth_package_id is needed, or default has bandwidth_package_id.
- cam
Role stringName - CAM role name authorized to access.
- count number
- Number of cvm.
- data
Disks KubernetesCluster Master Config Data Disk[] - Configurations of data disk.
- desired
Pod numberNum - Indicate to set desired pod number in node. valid when enable_customized_pod_cidr=true, and it override
[globe_]desired_pod_num
for current node. Either all the fieldsdesired_pod_num
or none. - disaster
Recover string[]Group Ids - Disaster recover groups to which a CVM instance belongs. Only support maximum 1.
- enhanced
Monitor booleanService - To specify whether to enable cloud monitor service. Default is TRUE.
- enhanced
Security booleanService - To specify whether to enable cloud security service. Default is TRUE.
- hostname string
- The host name of the attached instance. Dot (.) and dash (-) cannot be used as the first and last characters of HostName and cannot be used consecutively. Windows example: The length of the name character is [2, 15], letters (capitalization is not restricted), numbers and dashes (-) are allowed, dots (.) are not supported, and not all numbers are allowed. Examples of other types (Linux, etc.): The character length is [2, 60], and multiple dots are allowed. There is a segment between the dots. Each segment allows letters (with no limitation on capitalization), numbers and dashes (-).
- hpc
Cluster stringId - Id of cvm hpc cluster.
- img
Id string - The valid image id, format of img-xxx. Note:
img_id
will be replaced with the image corresponding to TKEcluster_os
. - instance
Charge stringType - The charge type of instance. Valid values are
PREPAID
andPOSTPAID_BY_HOUR
. The default isPOSTPAID_BY_HOUR
. Note: TencentCloud International only supportsPOSTPAID_BY_HOUR
,PREPAID
instance will not terminated after cluster deleted, and may not allow to delete before expired. - instance
Charge numberType Prepaid Period - The tenancy (time unit is month) of the prepaid instance. NOTE: it only works when instance_charge_type is set to
PREPAID
. Valid values are1
,2
,3
,4
,5
,6
,7
,8
,9
,10
,11
,12
,24
,36
. - instance
Charge stringType Prepaid Renew Flag - Auto renewal flag. Valid values:
NOTIFY_AND_AUTO_RENEW
: notify upon expiration and renew automatically,NOTIFY_AND_MANUAL_RENEW
: notify upon expiration but do not renew automatically,DISABLE_NOTIFY_AND_MANUAL_RENEW
: neither notify upon expiration nor renew automatically. Default value:NOTIFY_AND_MANUAL_RENEW
. If this parameter is specified asNOTIFY_AND_AUTO_RENEW
, the instance will be automatically renewed on a monthly basis if the account balance is sufficient. NOTE: it only works when instance_charge_type is set toPREPAID
. - instance
Name string - Name of the CVMs.
- internet
Charge stringType - Charge types for network traffic. Available values include
TRAFFIC_POSTPAID_BY_HOUR
. - internet
Max numberBandwidth Out - Max bandwidth of Internet access in Mbps. Default is 0.
- key
Ids string[] - ID list of keys, should be set if
password
not set. - password string
- Password to access, should be set if
key_ids
not set. - public
Ip booleanAssigned - Specify whether to assign an Internet IP address.
- security
Group string[]Ids - Security groups to which a CVM instance belongs.
- system
Disk numberSize - Volume of system disk in GB. Default is
50
. - system
Disk stringType - System disk type. For more information on limits of system disk types, see Storage Overview. Valid values:
LOCAL_BASIC
: local disk,LOCAL_SSD
: local SSD disk,CLOUD_SSD
: SSD,CLOUD_PREMIUM
: Premium Cloud Storage. NOTE:CLOUD_BASIC
,LOCAL_BASIC
andLOCAL_SSD
are deprecated. - user
Data string - ase64-encoded User Data text, the length limit is 16KB.
- instance_
type str - Specified types of CVM instance.
- subnet_
id str - Private network ID.
- availability_
zone str - Indicates which availability zone will be used.
- bandwidth_
package_ strid - bandwidth package id. if user is standard user, then the bandwidth_package_id is needed, or default has bandwidth_package_id.
- cam_
role_ strname - CAM role name authorized to access.
- count float
- Number of cvm.
- data_
disks Sequence[KubernetesCluster Master Config Data Disk] - Configurations of data disk.
- desired_
pod_ floatnum - Indicate to set desired pod number in node. valid when enable_customized_pod_cidr=true, and it override
[globe_]desired_pod_num
for current node. Either all the fieldsdesired_pod_num
or none. - disaster_
recover_ Sequence[str]group_ ids - Disaster recover groups to which a CVM instance belongs. Only support maximum 1.
- enhanced_
monitor_ boolservice - To specify whether to enable cloud monitor service. Default is TRUE.
- enhanced_
security_ boolservice - To specify whether to enable cloud security service. Default is TRUE.
- hostname str
- The host name of the attached instance. Dot (.) and dash (-) cannot be used as the first and last characters of HostName and cannot be used consecutively. Windows example: The length of the name character is [2, 15], letters (capitalization is not restricted), numbers and dashes (-) are allowed, dots (.) are not supported, and not all numbers are allowed. Examples of other types (Linux, etc.): The character length is [2, 60], and multiple dots are allowed. There is a segment between the dots. Each segment allows letters (with no limitation on capitalization), numbers and dashes (-).
- hpc_
cluster_ strid - Id of cvm hpc cluster.
- img_
id str - The valid image id, format of img-xxx. Note:
img_id
will be replaced with the image corresponding to TKEcluster_os
. - instance_
charge_ strtype - The charge type of instance. Valid values are
PREPAID
andPOSTPAID_BY_HOUR
. The default isPOSTPAID_BY_HOUR
. Note: TencentCloud International only supportsPOSTPAID_BY_HOUR
,PREPAID
instance will not terminated after cluster deleted, and may not allow to delete before expired. - instance_
charge_ floattype_ prepaid_ period - The tenancy (time unit is month) of the prepaid instance. NOTE: it only works when instance_charge_type is set to
PREPAID
. Valid values are1
,2
,3
,4
,5
,6
,7
,8
,9
,10
,11
,12
,24
,36
. - instance_
charge_ strtype_ prepaid_ renew_ flag - Auto renewal flag. Valid values:
NOTIFY_AND_AUTO_RENEW
: notify upon expiration and renew automatically,NOTIFY_AND_MANUAL_RENEW
: notify upon expiration but do not renew automatically,DISABLE_NOTIFY_AND_MANUAL_RENEW
: neither notify upon expiration nor renew automatically. Default value:NOTIFY_AND_MANUAL_RENEW
. If this parameter is specified asNOTIFY_AND_AUTO_RENEW
, the instance will be automatically renewed on a monthly basis if the account balance is sufficient. NOTE: it only works when instance_charge_type is set toPREPAID
. - instance_
name str - Name of the CVMs.
- internet_
charge_ strtype - Charge types for network traffic. Available values include
TRAFFIC_POSTPAID_BY_HOUR
. - internet_
max_ floatbandwidth_ out - Max bandwidth of Internet access in Mbps. Default is 0.
- key_
ids Sequence[str] - ID list of keys, should be set if
password
not set. - password str
- Password to access, should be set if
key_ids
not set. - public_
ip_ boolassigned - Specify whether to assign an Internet IP address.
- security_
group_ Sequence[str]ids - Security groups to which a CVM instance belongs.
- system_
disk_ floatsize - Volume of system disk in GB. Default is
50
. - system_
disk_ strtype - System disk type. For more information on limits of system disk types, see Storage Overview. Valid values:
LOCAL_BASIC
: local disk,LOCAL_SSD
: local SSD disk,CLOUD_SSD
: SSD,CLOUD_PREMIUM
: Premium Cloud Storage. NOTE:CLOUD_BASIC
,LOCAL_BASIC
andLOCAL_SSD
are deprecated. - user_
data str - ase64-encoded User Data text, the length limit is 16KB.
- instance
Type String - Specified types of CVM instance.
- subnet
Id String - Private network ID.
- availability
Zone String - Indicates which availability zone will be used.
- bandwidth
Package StringId - bandwidth package id. if user is standard user, then the bandwidth_package_id is needed, or default has bandwidth_package_id.
- cam
Role StringName - CAM role name authorized to access.
- count Number
- Number of cvm.
- data
Disks List<Property Map> - Configurations of data disk.
- desired
Pod NumberNum - Indicate to set desired pod number in node. valid when enable_customized_pod_cidr=true, and it override
[globe_]desired_pod_num
for current node. Either all the fieldsdesired_pod_num
or none. - disaster
Recover List<String>Group Ids - Disaster recover groups to which a CVM instance belongs. Only support maximum 1.
- enhanced
Monitor BooleanService - To specify whether to enable cloud monitor service. Default is TRUE.
- enhanced
Security BooleanService - To specify whether to enable cloud security service. Default is TRUE.
- hostname String
- The host name of the attached instance. Dot (.) and dash (-) cannot be used as the first and last characters of HostName and cannot be used consecutively. Windows example: The length of the name character is [2, 15], letters (capitalization is not restricted), numbers and dashes (-) are allowed, dots (.) are not supported, and not all numbers are allowed. Examples of other types (Linux, etc.): The character length is [2, 60], and multiple dots are allowed. There is a segment between the dots. Each segment allows letters (with no limitation on capitalization), numbers and dashes (-).
- hpc
Cluster StringId - Id of cvm hpc cluster.
- img
Id String - The valid image id, format of img-xxx. Note:
img_id
will be replaced with the image corresponding to TKEcluster_os
. - instance
Charge StringType - The charge type of instance. Valid values are
PREPAID
andPOSTPAID_BY_HOUR
. The default isPOSTPAID_BY_HOUR
. Note: TencentCloud International only supportsPOSTPAID_BY_HOUR
,PREPAID
instance will not terminated after cluster deleted, and may not allow to delete before expired. - instance
Charge NumberType Prepaid Period - The tenancy (time unit is month) of the prepaid instance. NOTE: it only works when instance_charge_type is set to
PREPAID
. Valid values are1
,2
,3
,4
,5
,6
,7
,8
,9
,10
,11
,12
,24
,36
. - instance
Charge StringType Prepaid Renew Flag - Auto renewal flag. Valid values:
NOTIFY_AND_AUTO_RENEW
: notify upon expiration and renew automatically,NOTIFY_AND_MANUAL_RENEW
: notify upon expiration but do not renew automatically,DISABLE_NOTIFY_AND_MANUAL_RENEW
: neither notify upon expiration nor renew automatically. Default value:NOTIFY_AND_MANUAL_RENEW
. If this parameter is specified asNOTIFY_AND_AUTO_RENEW
, the instance will be automatically renewed on a monthly basis if the account balance is sufficient. NOTE: it only works when instance_charge_type is set toPREPAID
. - instance
Name String - Name of the CVMs.
- internet
Charge StringType - Charge types for network traffic. Available values include
TRAFFIC_POSTPAID_BY_HOUR
. - internet
Max NumberBandwidth Out - Max bandwidth of Internet access in Mbps. Default is 0.
- key
Ids List<String> - ID list of keys, should be set if
password
not set. - password String
- Password to access, should be set if
key_ids
not set. - public
Ip BooleanAssigned - Specify whether to assign an Internet IP address.
- security
Group List<String>Ids - Security groups to which a CVM instance belongs.
- system
Disk NumberSize - Volume of system disk in GB. Default is
50
. - system
Disk StringType - System disk type. For more information on limits of system disk types, see Storage Overview. Valid values:
LOCAL_BASIC
: local disk,LOCAL_SSD
: local SSD disk,CLOUD_SSD
: SSD,CLOUD_PREMIUM
: Premium Cloud Storage. NOTE:CLOUD_BASIC
,LOCAL_BASIC
andLOCAL_SSD
are deprecated. - user
Data String - ase64-encoded User Data text, the length limit is 16KB.
KubernetesClusterMasterConfigDataDisk, KubernetesClusterMasterConfigDataDiskArgs
- Auto
Format boolAnd Mount - Indicate whether to auto format and mount or not. Default is
false
. - Disk
Partition string - The name of the device or partition to mount.
- Disk
Size double - Volume of disk in GB. Default is
0
. - Disk
Type string - Types of disk, available values:
CLOUD_PREMIUM
andCLOUD_SSD
andCLOUD_HSSD
andCLOUD_TSSD
. - Encrypt bool
- Indicates whether to encrypt data disk, default
false
. - File
System string - File system, e.g.
ext3/ext4/xfs
. - Kms
Key stringId - ID of the custom CMK in the format of UUID or
kms-abcd1234
. This parameter is used to encrypt cloud disks. - Mount
Target string - Mount target.
- Snapshot
Id string - Data disk snapshot ID.
- Auto
Format boolAnd Mount - Indicate whether to auto format and mount or not. Default is
false
. - Disk
Partition string - The name of the device or partition to mount.
- Disk
Size float64 - Volume of disk in GB. Default is
0
. - Disk
Type string - Types of disk, available values:
CLOUD_PREMIUM
andCLOUD_SSD
andCLOUD_HSSD
andCLOUD_TSSD
. - Encrypt bool
- Indicates whether to encrypt data disk, default
false
. - File
System string - File system, e.g.
ext3/ext4/xfs
. - Kms
Key stringId - ID of the custom CMK in the format of UUID or
kms-abcd1234
. This parameter is used to encrypt cloud disks. - Mount
Target string - Mount target.
- Snapshot
Id string - Data disk snapshot ID.
- auto
Format BooleanAnd Mount - Indicate whether to auto format and mount or not. Default is
false
. - disk
Partition String - The name of the device or partition to mount.
- disk
Size Double - Volume of disk in GB. Default is
0
. - disk
Type String - Types of disk, available values:
CLOUD_PREMIUM
andCLOUD_SSD
andCLOUD_HSSD
andCLOUD_TSSD
. - encrypt Boolean
- Indicates whether to encrypt data disk, default
false
. - file
System String - File system, e.g.
ext3/ext4/xfs
. - kms
Key StringId - ID of the custom CMK in the format of UUID or
kms-abcd1234
. This parameter is used to encrypt cloud disks. - mount
Target String - Mount target.
- snapshot
Id String - Data disk snapshot ID.
- auto
Format booleanAnd Mount - Indicate whether to auto format and mount or not. Default is
false
. - disk
Partition string - The name of the device or partition to mount.
- disk
Size number - Volume of disk in GB. Default is
0
. - disk
Type string - Types of disk, available values:
CLOUD_PREMIUM
andCLOUD_SSD
andCLOUD_HSSD
andCLOUD_TSSD
. - encrypt boolean
- Indicates whether to encrypt data disk, default
false
. - file
System string - File system, e.g.
ext3/ext4/xfs
. - kms
Key stringId - ID of the custom CMK in the format of UUID or
kms-abcd1234
. This parameter is used to encrypt cloud disks. - mount
Target string - Mount target.
- snapshot
Id string - Data disk snapshot ID.
- auto_
format_ booland_ mount - Indicate whether to auto format and mount or not. Default is
false
. - disk_
partition str - The name of the device or partition to mount.
- disk_
size float - Volume of disk in GB. Default is
0
. - disk_
type str - Types of disk, available values:
CLOUD_PREMIUM
andCLOUD_SSD
andCLOUD_HSSD
andCLOUD_TSSD
. - encrypt bool
- Indicates whether to encrypt data disk, default
false
. - file_
system str - File system, e.g.
ext3/ext4/xfs
. - kms_
key_ strid - ID of the custom CMK in the format of UUID or
kms-abcd1234
. This parameter is used to encrypt cloud disks. - mount_
target str - Mount target.
- snapshot_
id str - Data disk snapshot ID.
- auto
Format BooleanAnd Mount - Indicate whether to auto format and mount or not. Default is
false
. - disk
Partition String - The name of the device or partition to mount.
- disk
Size Number - Volume of disk in GB. Default is
0
. - disk
Type String - Types of disk, available values:
CLOUD_PREMIUM
andCLOUD_SSD
andCLOUD_HSSD
andCLOUD_TSSD
. - encrypt Boolean
- Indicates whether to encrypt data disk, default
false
. - file
System String - File system, e.g.
ext3/ext4/xfs
. - kms
Key StringId - ID of the custom CMK in the format of UUID or
kms-abcd1234
. This parameter is used to encrypt cloud disks. - mount
Target String - Mount target.
- snapshot
Id String - Data disk snapshot ID.
KubernetesClusterNodePoolGlobalConfig, KubernetesClusterNodePoolGlobalConfigArgs
- Expander string
- Indicates which scale-out method will be used when there are multiple scaling groups. Valid values:
random
- select a random scaling group,most-pods
- select the scaling group that can schedule the most pods,least-waste
- select the scaling group that can ensure the fewest remaining resources after Pod scheduling. - Ignore
Daemon boolSets Utilization - Whether to ignore DaemonSet pods by default when calculating resource usage.
- Is
Scale boolIn Enabled - Indicates whether to enable scale-in.
- Max
Concurrent doubleScale In - Max concurrent scale-in volume.
- Scale
In doubleDelay - Number of minutes after cluster scale-out when the system starts judging whether to perform scale-in.
- Scale
In doubleUnneeded Time - Number of consecutive minutes of idleness after which the node is subject to scale-in.
- Scale
In doubleUtilization Threshold - Percentage of node resource usage below which the node is considered to be idle.
- Skip
Nodes boolWith Local Storage - During scale-in, ignore nodes with local storage pods.
- Skip
Nodes boolWith System Pods - During scale-in, ignore nodes with pods in the kube-system namespace that are not managed by DaemonSet.
- Expander string
- Indicates which scale-out method will be used when there are multiple scaling groups. Valid values:
random
- select a random scaling group,most-pods
- select the scaling group that can schedule the most pods,least-waste
- select the scaling group that can ensure the fewest remaining resources after Pod scheduling. - Ignore
Daemon boolSets Utilization - Whether to ignore DaemonSet pods by default when calculating resource usage.
- Is
Scale boolIn Enabled - Indicates whether to enable scale-in.
- Max
Concurrent float64Scale In - Max concurrent scale-in volume.
- Scale
In float64Delay - Number of minutes after cluster scale-out when the system starts judging whether to perform scale-in.
- Scale
In float64Unneeded Time - Number of consecutive minutes of idleness after which the node is subject to scale-in.
- Scale
In float64Utilization Threshold - Percentage of node resource usage below which the node is considered to be idle.
- Skip
Nodes boolWith Local Storage - During scale-in, ignore nodes with local storage pods.
- Skip
Nodes boolWith System Pods - During scale-in, ignore nodes with pods in the kube-system namespace that are not managed by DaemonSet.
- expander String
- Indicates which scale-out method will be used when there are multiple scaling groups. Valid values:
random
- select a random scaling group,most-pods
- select the scaling group that can schedule the most pods,least-waste
- select the scaling group that can ensure the fewest remaining resources after Pod scheduling. - ignore
Daemon BooleanSets Utilization - Whether to ignore DaemonSet pods by default when calculating resource usage.
- is
Scale BooleanIn Enabled - Indicates whether to enable scale-in.
- max
Concurrent DoubleScale In - Max concurrent scale-in volume.
- scale
In DoubleDelay - Number of minutes after cluster scale-out when the system starts judging whether to perform scale-in.
- scale
In DoubleUnneeded Time - Number of consecutive minutes of idleness after which the node is subject to scale-in.
- scale
In DoubleUtilization Threshold - Percentage of node resource usage below which the node is considered to be idle.
- skip
Nodes BooleanWith Local Storage - During scale-in, ignore nodes with local storage pods.
- skip
Nodes BooleanWith System Pods - During scale-in, ignore nodes with pods in the kube-system namespace that are not managed by DaemonSet.
- expander string
- Indicates which scale-out method will be used when there are multiple scaling groups. Valid values:
random
- select a random scaling group,most-pods
- select the scaling group that can schedule the most pods,least-waste
- select the scaling group that can ensure the fewest remaining resources after Pod scheduling. - ignore
Daemon booleanSets Utilization - Whether to ignore DaemonSet pods by default when calculating resource usage.
- is
Scale booleanIn Enabled - Indicates whether to enable scale-in.
- max
Concurrent numberScale In - Max concurrent scale-in volume.
- scale
In numberDelay - Number of minutes after cluster scale-out when the system starts judging whether to perform scale-in.
- scale
In numberUnneeded Time - Number of consecutive minutes of idleness after which the node is subject to scale-in.
- scale
In numberUtilization Threshold - Percentage of node resource usage below which the node is considered to be idle.
- skip
Nodes booleanWith Local Storage - During scale-in, ignore nodes with local storage pods.
- skip
Nodes booleanWith System Pods - During scale-in, ignore nodes with pods in the kube-system namespace that are not managed by DaemonSet.
- expander str
- Indicates which scale-out method will be used when there are multiple scaling groups. Valid values:
random
- select a random scaling group,most-pods
- select the scaling group that can schedule the most pods,least-waste
- select the scaling group that can ensure the fewest remaining resources after Pod scheduling. - ignore_
daemon_ boolsets_ utilization - Whether to ignore DaemonSet pods by default when calculating resource usage.
- is_
scale_ boolin_ enabled - Indicates whether to enable scale-in.
- max_
concurrent_ floatscale_ in - Max concurrent scale-in volume.
- scale_
in_ floatdelay - Number of minutes after cluster scale-out when the system starts judging whether to perform scale-in.
- scale_
in_ floatunneeded_ time - Number of consecutive minutes of idleness after which the node is subject to scale-in.
- scale_
in_ floatutilization_ threshold - Percentage of node resource usage below which the node is considered to be idle.
- skip_
nodes_ boolwith_ local_ storage - During scale-in, ignore nodes with local storage pods.
- skip_
nodes_ boolwith_ system_ pods - During scale-in, ignore nodes with pods in the kube-system namespace that are not managed by DaemonSet.
- expander String
- Indicates which scale-out method will be used when there are multiple scaling groups. Valid values:
random
- select a random scaling group,most-pods
- select the scaling group that can schedule the most pods,least-waste
- select the scaling group that can ensure the fewest remaining resources after Pod scheduling. - ignore
Daemon BooleanSets Utilization - Whether to ignore DaemonSet pods by default when calculating resource usage.
- is
Scale BooleanIn Enabled - Indicates whether to enable scale-in.
- max
Concurrent NumberScale In - Max concurrent scale-in volume.
- scale
In NumberDelay - Number of minutes after cluster scale-out when the system starts judging whether to perform scale-in.
- scale
In NumberUnneeded Time - Number of consecutive minutes of idleness after which the node is subject to scale-in.
- scale
In NumberUtilization Threshold - Percentage of node resource usage below which the node is considered to be idle.
- skip
Nodes BooleanWith Local Storage - During scale-in, ignore nodes with local storage pods.
- skip
Nodes BooleanWith System Pods - During scale-in, ignore nodes with pods in the kube-system namespace that are not managed by DaemonSet.
KubernetesClusterResourceDeleteOption, KubernetesClusterResourceDeleteOptionArgs
- Delete
Mode string - The deletion mode of CBS resources when the cluster is deleted,
terminate
(destroy),retain
(retain). Other resources are deleted by default. - Resource
Type string - Resource type, valid values are
CBS
,CLB
, andCVM
. - Skip
Deletion boolProtection - Whether to skip resources with deletion protection enabled, the default is false.
- Delete
Mode string - The deletion mode of CBS resources when the cluster is deleted,
terminate
(destroy),retain
(retain). Other resources are deleted by default. - Resource
Type string - Resource type, valid values are
CBS
,CLB
, andCVM
. - Skip
Deletion boolProtection - Whether to skip resources with deletion protection enabled, the default is false.
- delete
Mode String - The deletion mode of CBS resources when the cluster is deleted,
terminate
(destroy),retain
(retain). Other resources are deleted by default. - resource
Type String - Resource type, valid values are
CBS
,CLB
, andCVM
. - skip
Deletion BooleanProtection - Whether to skip resources with deletion protection enabled, the default is false.
- delete
Mode string - The deletion mode of CBS resources when the cluster is deleted,
terminate
(destroy),retain
(retain). Other resources are deleted by default. - resource
Type string - Resource type, valid values are
CBS
,CLB
, andCVM
. - skip
Deletion booleanProtection - Whether to skip resources with deletion protection enabled, the default is false.
- delete_
mode str - The deletion mode of CBS resources when the cluster is deleted,
terminate
(destroy),retain
(retain). Other resources are deleted by default. - resource_
type str - Resource type, valid values are
CBS
,CLB
, andCVM
. - skip_
deletion_ boolprotection - Whether to skip resources with deletion protection enabled, the default is false.
- delete
Mode String - The deletion mode of CBS resources when the cluster is deleted,
terminate
(destroy),retain
(retain). Other resources are deleted by default. - resource
Type String - Resource type, valid values are
CBS
,CLB
, andCVM
. - skip
Deletion BooleanProtection - Whether to skip resources with deletion protection enabled, the default is false.
KubernetesClusterWorkerConfig, KubernetesClusterWorkerConfigArgs
- Instance
Type string - Specified types of CVM instance.
- Subnet
Id string - Private network ID.
- Availability
Zone string - Indicates which availability zone will be used.
- Bandwidth
Package stringId - bandwidth package id. if user is standard user, then the bandwidth_package_id is needed, or default has bandwidth_package_id.
- Cam
Role stringName - CAM role name authorized to access.
- Count double
- Number of cvm.
- Data
Disks List<KubernetesCluster Worker Config Data Disk> - Configurations of data disk.
- Desired
Pod doubleNum - Indicate to set desired pod number in node. valid when enable_customized_pod_cidr=true, and it override
[globe_]desired_pod_num
for current node. Either all the fieldsdesired_pod_num
or none. - Disaster
Recover List<string>Group Ids - Disaster recover groups to which a CVM instance belongs. Only support maximum 1.
- Enhanced
Monitor boolService - To specify whether to enable cloud monitor service. Default is TRUE.
- Enhanced
Security boolService - To specify whether to enable cloud security service. Default is TRUE.
- Hostname string
- The host name of the attached instance. Dot (.) and dash (-) cannot be used as the first and last characters of HostName and cannot be used consecutively. Windows example: The length of the name character is [2, 15], letters (capitalization is not restricted), numbers and dashes (-) are allowed, dots (.) are not supported, and not all numbers are allowed. Examples of other types (Linux, etc.): The character length is [2, 60], and multiple dots are allowed. There is a segment between the dots. Each segment allows letters (with no limitation on capitalization), numbers and dashes (-).
- Hpc
Cluster stringId - Id of cvm hpc cluster.
- Img
Id string - The valid image id, format of img-xxx. Note:
img_id
will be replaced with the image corresponding to TKEcluster_os
. - Instance
Charge stringType - The charge type of instance. Valid values are
PREPAID
andPOSTPAID_BY_HOUR
. The default isPOSTPAID_BY_HOUR
. Note: TencentCloud International only supportsPOSTPAID_BY_HOUR
,PREPAID
instance will not terminated after cluster deleted, and may not allow to delete before expired. - Instance
Charge doubleType Prepaid Period - The tenancy (time unit is month) of the prepaid instance. NOTE: it only works when instance_charge_type is set to
PREPAID
. Valid values are1
,2
,3
,4
,5
,6
,7
,8
,9
,10
,11
,12
,24
,36
. - Instance
Charge stringType Prepaid Renew Flag - Auto renewal flag. Valid values:
NOTIFY_AND_AUTO_RENEW
: notify upon expiration and renew automatically,NOTIFY_AND_MANUAL_RENEW
: notify upon expiration but do not renew automatically,DISABLE_NOTIFY_AND_MANUAL_RENEW
: neither notify upon expiration nor renew automatically. Default value:NOTIFY_AND_MANUAL_RENEW
. If this parameter is specified asNOTIFY_AND_AUTO_RENEW
, the instance will be automatically renewed on a monthly basis if the account balance is sufficient. NOTE: it only works when instance_charge_type is set toPREPAID
. - Instance
Name string - Name of the CVMs.
- Internet
Charge stringType - Charge types for network traffic. Available values include
TRAFFIC_POSTPAID_BY_HOUR
. - Internet
Max doubleBandwidth Out - Max bandwidth of Internet access in Mbps. Default is 0.
- Key
Ids List<string> - ID list of keys, should be set if
password
not set. - Password string
- Password to access, should be set if
key_ids
not set. - Public
Ip boolAssigned - Specify whether to assign an Internet IP address.
- Security
Group List<string>Ids - Security groups to which a CVM instance belongs.
- System
Disk doubleSize - Volume of system disk in GB. Default is
50
. - System
Disk stringType - System disk type. For more information on limits of system disk types, see Storage Overview. Valid values:
LOCAL_BASIC
: local disk,LOCAL_SSD
: local SSD disk,CLOUD_SSD
: SSD,CLOUD_PREMIUM
: Premium Cloud Storage. NOTE:CLOUD_BASIC
,LOCAL_BASIC
andLOCAL_SSD
are deprecated. - User
Data string - ase64-encoded User Data text, the length limit is 16KB.
- Instance
Type string - Specified types of CVM instance.
- Subnet
Id string - Private network ID.
- Availability
Zone string - Indicates which availability zone will be used.
- Bandwidth
Package stringId - bandwidth package id. if user is standard user, then the bandwidth_package_id is needed, or default has bandwidth_package_id.
- Cam
Role stringName - CAM role name authorized to access.
- Count float64
- Number of cvm.
- Data
Disks []KubernetesCluster Worker Config Data Disk - Configurations of data disk.
- Desired
Pod float64Num - Indicate to set desired pod number in node. valid when enable_customized_pod_cidr=true, and it override
[globe_]desired_pod_num
for current node. Either all the fieldsdesired_pod_num
or none. - Disaster
Recover []stringGroup Ids - Disaster recover groups to which a CVM instance belongs. Only support maximum 1.
- Enhanced
Monitor boolService - To specify whether to enable cloud monitor service. Default is TRUE.
- Enhanced
Security boolService - To specify whether to enable cloud security service. Default is TRUE.
- Hostname string
- The host name of the attached instance. Dot (.) and dash (-) cannot be used as the first and last characters of HostName and cannot be used consecutively. Windows example: The length of the name character is [2, 15], letters (capitalization is not restricted), numbers and dashes (-) are allowed, dots (.) are not supported, and not all numbers are allowed. Examples of other types (Linux, etc.): The character length is [2, 60], and multiple dots are allowed. There is a segment between the dots. Each segment allows letters (with no limitation on capitalization), numbers and dashes (-).
- Hpc
Cluster stringId - Id of cvm hpc cluster.
- Img
Id string - The valid image id, format of img-xxx. Note:
img_id
will be replaced with the image corresponding to TKEcluster_os
. - Instance
Charge stringType - The charge type of instance. Valid values are
PREPAID
andPOSTPAID_BY_HOUR
. The default isPOSTPAID_BY_HOUR
. Note: TencentCloud International only supportsPOSTPAID_BY_HOUR
,PREPAID
instance will not terminated after cluster deleted, and may not allow to delete before expired. - Instance
Charge float64Type Prepaid Period - The tenancy (time unit is month) of the prepaid instance. NOTE: it only works when instance_charge_type is set to
PREPAID
. Valid values are1
,2
,3
,4
,5
,6
,7
,8
,9
,10
,11
,12
,24
,36
. - Instance
Charge stringType Prepaid Renew Flag - Auto renewal flag. Valid values:
NOTIFY_AND_AUTO_RENEW
: notify upon expiration and renew automatically,NOTIFY_AND_MANUAL_RENEW
: notify upon expiration but do not renew automatically,DISABLE_NOTIFY_AND_MANUAL_RENEW
: neither notify upon expiration nor renew automatically. Default value:NOTIFY_AND_MANUAL_RENEW
. If this parameter is specified asNOTIFY_AND_AUTO_RENEW
, the instance will be automatically renewed on a monthly basis if the account balance is sufficient. NOTE: it only works when instance_charge_type is set toPREPAID
. - Instance
Name string - Name of the CVMs.
- Internet
Charge stringType - Charge types for network traffic. Available values include
TRAFFIC_POSTPAID_BY_HOUR
. - Internet
Max float64Bandwidth Out - Max bandwidth of Internet access in Mbps. Default is 0.
- Key
Ids []string - ID list of keys, should be set if
password
not set. - Password string
- Password to access, should be set if
key_ids
not set. - Public
Ip boolAssigned - Specify whether to assign an Internet IP address.
- Security
Group []stringIds - Security groups to which a CVM instance belongs.
- System
Disk float64Size - Volume of system disk in GB. Default is
50
. - System
Disk stringType - System disk type. For more information on limits of system disk types, see Storage Overview. Valid values:
LOCAL_BASIC
: local disk,LOCAL_SSD
: local SSD disk,CLOUD_SSD
: SSD,CLOUD_PREMIUM
: Premium Cloud Storage. NOTE:CLOUD_BASIC
,LOCAL_BASIC
andLOCAL_SSD
are deprecated. - User
Data string - ase64-encoded User Data text, the length limit is 16KB.
- instance
Type String - Specified types of CVM instance.
- subnet
Id String - Private network ID.
- availability
Zone String - Indicates which availability zone will be used.
- bandwidth
Package StringId - bandwidth package id. if user is standard user, then the bandwidth_package_id is needed, or default has bandwidth_package_id.
- cam
Role StringName - CAM role name authorized to access.
- count Double
- Number of cvm.
- data
Disks List<KubernetesCluster Worker Config Data Disk> - Configurations of data disk.
- desired
Pod DoubleNum - Indicate to set desired pod number in node. valid when enable_customized_pod_cidr=true, and it override
[globe_]desired_pod_num
for current node. Either all the fieldsdesired_pod_num
or none. - disaster
Recover List<String>Group Ids - Disaster recover groups to which a CVM instance belongs. Only support maximum 1.
- enhanced
Monitor BooleanService - To specify whether to enable cloud monitor service. Default is TRUE.
- enhanced
Security BooleanService - To specify whether to enable cloud security service. Default is TRUE.
- hostname String
- The host name of the attached instance. Dot (.) and dash (-) cannot be used as the first and last characters of HostName and cannot be used consecutively. Windows example: The length of the name character is [2, 15], letters (capitalization is not restricted), numbers and dashes (-) are allowed, dots (.) are not supported, and not all numbers are allowed. Examples of other types (Linux, etc.): The character length is [2, 60], and multiple dots are allowed. There is a segment between the dots. Each segment allows letters (with no limitation on capitalization), numbers and dashes (-).
- hpc
Cluster StringId - Id of cvm hpc cluster.
- img
Id String - The valid image id, format of img-xxx. Note:
img_id
will be replaced with the image corresponding to TKEcluster_os
. - instance
Charge StringType - The charge type of instance. Valid values are
PREPAID
andPOSTPAID_BY_HOUR
. The default isPOSTPAID_BY_HOUR
. Note: TencentCloud International only supportsPOSTPAID_BY_HOUR
,PREPAID
instance will not terminated after cluster deleted, and may not allow to delete before expired. - instance
Charge DoubleType Prepaid Period - The tenancy (time unit is month) of the prepaid instance. NOTE: it only works when instance_charge_type is set to
PREPAID
. Valid values are1
,2
,3
,4
,5
,6
,7
,8
,9
,10
,11
,12
,24
,36
. - instance
Charge StringType Prepaid Renew Flag - Auto renewal flag. Valid values:
NOTIFY_AND_AUTO_RENEW
: notify upon expiration and renew automatically,NOTIFY_AND_MANUAL_RENEW
: notify upon expiration but do not renew automatically,DISABLE_NOTIFY_AND_MANUAL_RENEW
: neither notify upon expiration nor renew automatically. Default value:NOTIFY_AND_MANUAL_RENEW
. If this parameter is specified asNOTIFY_AND_AUTO_RENEW
, the instance will be automatically renewed on a monthly basis if the account balance is sufficient. NOTE: it only works when instance_charge_type is set toPREPAID
. - instance
Name String - Name of the CVMs.
- internet
Charge StringType - Charge types for network traffic. Available values include
TRAFFIC_POSTPAID_BY_HOUR
. - internet
Max DoubleBandwidth Out - Max bandwidth of Internet access in Mbps. Default is 0.
- key
Ids List<String> - ID list of keys, should be set if
password
not set. - password String
- Password to access, should be set if
key_ids
not set. - public
Ip BooleanAssigned - Specify whether to assign an Internet IP address.
- security
Group List<String>Ids - Security groups to which a CVM instance belongs.
- system
Disk DoubleSize - Volume of system disk in GB. Default is
50
. - system
Disk StringType - System disk type. For more information on limits of system disk types, see Storage Overview. Valid values:
LOCAL_BASIC
: local disk,LOCAL_SSD
: local SSD disk,CLOUD_SSD
: SSD,CLOUD_PREMIUM
: Premium Cloud Storage. NOTE:CLOUD_BASIC
,LOCAL_BASIC
andLOCAL_SSD
are deprecated. - user
Data String - ase64-encoded User Data text, the length limit is 16KB.
- instance
Type string - Specified types of CVM instance.
- subnet
Id string - Private network ID.
- availability
Zone string - Indicates which availability zone will be used.
- bandwidth
Package stringId - bandwidth package id. if user is standard user, then the bandwidth_package_id is needed, or default has bandwidth_package_id.
- cam
Role stringName - CAM role name authorized to access.
- count number
- Number of cvm.
- data
Disks KubernetesCluster Worker Config Data Disk[] - Configurations of data disk.
- desired
Pod numberNum - Indicate to set desired pod number in node. valid when enable_customized_pod_cidr=true, and it override
[globe_]desired_pod_num
for current node. Either all the fieldsdesired_pod_num
or none. - disaster
Recover string[]Group Ids - Disaster recover groups to which a CVM instance belongs. Only support maximum 1.
- enhanced
Monitor booleanService - To specify whether to enable cloud monitor service. Default is TRUE.
- enhanced
Security booleanService - To specify whether to enable cloud security service. Default is TRUE.
- hostname string
- The host name of the attached instance. Dot (.) and dash (-) cannot be used as the first and last characters of HostName and cannot be used consecutively. Windows example: The length of the name character is [2, 15], letters (capitalization is not restricted), numbers and dashes (-) are allowed, dots (.) are not supported, and not all numbers are allowed. Examples of other types (Linux, etc.): The character length is [2, 60], and multiple dots are allowed. There is a segment between the dots. Each segment allows letters (with no limitation on capitalization), numbers and dashes (-).
- hpc
Cluster stringId - Id of cvm hpc cluster.
- img
Id string - The valid image id, format of img-xxx. Note:
img_id
will be replaced with the image corresponding to TKEcluster_os
. - instance
Charge stringType - The charge type of instance. Valid values are
PREPAID
andPOSTPAID_BY_HOUR
. The default isPOSTPAID_BY_HOUR
. Note: TencentCloud International only supportsPOSTPAID_BY_HOUR
,PREPAID
instance will not terminated after cluster deleted, and may not allow to delete before expired. - instance
Charge numberType Prepaid Period - The tenancy (time unit is month) of the prepaid instance. NOTE: it only works when instance_charge_type is set to
PREPAID
. Valid values are1
,2
,3
,4
,5
,6
,7
,8
,9
,10
,11
,12
,24
,36
. - instance
Charge stringType Prepaid Renew Flag - Auto renewal flag. Valid values:
NOTIFY_AND_AUTO_RENEW
: notify upon expiration and renew automatically,NOTIFY_AND_MANUAL_RENEW
: notify upon expiration but do not renew automatically,DISABLE_NOTIFY_AND_MANUAL_RENEW
: neither notify upon expiration nor renew automatically. Default value:NOTIFY_AND_MANUAL_RENEW
. If this parameter is specified asNOTIFY_AND_AUTO_RENEW
, the instance will be automatically renewed on a monthly basis if the account balance is sufficient. NOTE: it only works when instance_charge_type is set toPREPAID
. - instance
Name string - Name of the CVMs.
- internet
Charge stringType - Charge types for network traffic. Available values include
TRAFFIC_POSTPAID_BY_HOUR
. - internet
Max numberBandwidth Out - Max bandwidth of Internet access in Mbps. Default is 0.
- key
Ids string[] - ID list of keys, should be set if
password
not set. - password string
- Password to access, should be set if
key_ids
not set. - public
Ip booleanAssigned - Specify whether to assign an Internet IP address.
- security
Group string[]Ids - Security groups to which a CVM instance belongs.
- system
Disk numberSize - Volume of system disk in GB. Default is
50
. - system
Disk stringType - System disk type. For more information on limits of system disk types, see Storage Overview. Valid values:
LOCAL_BASIC
: local disk,LOCAL_SSD
: local SSD disk,CLOUD_SSD
: SSD,CLOUD_PREMIUM
: Premium Cloud Storage. NOTE:CLOUD_BASIC
,LOCAL_BASIC
andLOCAL_SSD
are deprecated. - user
Data string - ase64-encoded User Data text, the length limit is 16KB.
- instance_
type str - Specified types of CVM instance.
- subnet_
id str - Private network ID.
- availability_
zone str - Indicates which availability zone will be used.
- bandwidth_
package_ strid - bandwidth package id. if user is standard user, then the bandwidth_package_id is needed, or default has bandwidth_package_id.
- cam_
role_ strname - CAM role name authorized to access.
- count float
- Number of cvm.
- data_
disks Sequence[KubernetesCluster Worker Config Data Disk] - Configurations of data disk.
- desired_
pod_ floatnum - Indicate to set desired pod number in node. valid when enable_customized_pod_cidr=true, and it override
[globe_]desired_pod_num
for current node. Either all the fieldsdesired_pod_num
or none. - disaster_
recover_ Sequence[str]group_ ids - Disaster recover groups to which a CVM instance belongs. Only support maximum 1.
- enhanced_
monitor_ boolservice - To specify whether to enable cloud monitor service. Default is TRUE.
- enhanced_
security_ boolservice - To specify whether to enable cloud security service. Default is TRUE.
- hostname str
- The host name of the attached instance. Dot (.) and dash (-) cannot be used as the first and last characters of HostName and cannot be used consecutively. Windows example: The length of the name character is [2, 15], letters (capitalization is not restricted), numbers and dashes (-) are allowed, dots (.) are not supported, and not all numbers are allowed. Examples of other types (Linux, etc.): The character length is [2, 60], and multiple dots are allowed. There is a segment between the dots. Each segment allows letters (with no limitation on capitalization), numbers and dashes (-).
- hpc_
cluster_ strid - Id of cvm hpc cluster.
- img_
id str - The valid image id, format of img-xxx. Note:
img_id
will be replaced with the image corresponding to TKEcluster_os
. - instance_
charge_ strtype - The charge type of instance. Valid values are
PREPAID
andPOSTPAID_BY_HOUR
. The default isPOSTPAID_BY_HOUR
. Note: TencentCloud International only supportsPOSTPAID_BY_HOUR
,PREPAID
instance will not terminated after cluster deleted, and may not allow to delete before expired. - instance_
charge_ floattype_ prepaid_ period - The tenancy (time unit is month) of the prepaid instance. NOTE: it only works when instance_charge_type is set to
PREPAID
. Valid values are1
,2
,3
,4
,5
,6
,7
,8
,9
,10
,11
,12
,24
,36
. - instance_
charge_ strtype_ prepaid_ renew_ flag - Auto renewal flag. Valid values:
NOTIFY_AND_AUTO_RENEW
: notify upon expiration and renew automatically,NOTIFY_AND_MANUAL_RENEW
: notify upon expiration but do not renew automatically,DISABLE_NOTIFY_AND_MANUAL_RENEW
: neither notify upon expiration nor renew automatically. Default value:NOTIFY_AND_MANUAL_RENEW
. If this parameter is specified asNOTIFY_AND_AUTO_RENEW
, the instance will be automatically renewed on a monthly basis if the account balance is sufficient. NOTE: it only works when instance_charge_type is set toPREPAID
. - instance_
name str - Name of the CVMs.
- internet_
charge_ strtype - Charge types for network traffic. Available values include
TRAFFIC_POSTPAID_BY_HOUR
. - internet_
max_ floatbandwidth_ out - Max bandwidth of Internet access in Mbps. Default is 0.
- key_
ids Sequence[str] - ID list of keys, should be set if
password
not set. - password str
- Password to access, should be set if
key_ids
not set. - public_
ip_ boolassigned - Specify whether to assign an Internet IP address.
- security_
group_ Sequence[str]ids - Security groups to which a CVM instance belongs.
- system_
disk_ floatsize - Volume of system disk in GB. Default is
50
. - system_
disk_ strtype - System disk type. For more information on limits of system disk types, see Storage Overview. Valid values:
LOCAL_BASIC
: local disk,LOCAL_SSD
: local SSD disk,CLOUD_SSD
: SSD,CLOUD_PREMIUM
: Premium Cloud Storage. NOTE:CLOUD_BASIC
,LOCAL_BASIC
andLOCAL_SSD
are deprecated. - user_
data str - ase64-encoded User Data text, the length limit is 16KB.
- instance
Type String - Specified types of CVM instance.
- subnet
Id String - Private network ID.
- availability
Zone String - Indicates which availability zone will be used.
- bandwidth
Package StringId - bandwidth package id. if user is standard user, then the bandwidth_package_id is needed, or default has bandwidth_package_id.
- cam
Role StringName - CAM role name authorized to access.
- count Number
- Number of cvm.
- data
Disks List<Property Map> - Configurations of data disk.
- desired
Pod NumberNum - Indicate to set desired pod number in node. valid when enable_customized_pod_cidr=true, and it override
[globe_]desired_pod_num
for current node. Either all the fieldsdesired_pod_num
or none. - disaster
Recover List<String>Group Ids - Disaster recover groups to which a CVM instance belongs. Only support maximum 1.
- enhanced
Monitor BooleanService - To specify whether to enable cloud monitor service. Default is TRUE.
- enhanced
Security BooleanService - To specify whether to enable cloud security service. Default is TRUE.
- hostname String
- The host name of the attached instance. Dot (.) and dash (-) cannot be used as the first and last characters of HostName and cannot be used consecutively. Windows example: The length of the name character is [2, 15], letters (capitalization is not restricted), numbers and dashes (-) are allowed, dots (.) are not supported, and not all numbers are allowed. Examples of other types (Linux, etc.): The character length is [2, 60], and multiple dots are allowed. There is a segment between the dots. Each segment allows letters (with no limitation on capitalization), numbers and dashes (-).
- hpc
Cluster StringId - Id of cvm hpc cluster.
- img
Id String - The valid image id, format of img-xxx. Note:
img_id
will be replaced with the image corresponding to TKEcluster_os
. - instance
Charge StringType - The charge type of instance. Valid values are
PREPAID
andPOSTPAID_BY_HOUR
. The default isPOSTPAID_BY_HOUR
. Note: TencentCloud International only supportsPOSTPAID_BY_HOUR
,PREPAID
instance will not terminated after cluster deleted, and may not allow to delete before expired. - instance
Charge NumberType Prepaid Period - The tenancy (time unit is month) of the prepaid instance. NOTE: it only works when instance_charge_type is set to
PREPAID
. Valid values are1
,2
,3
,4
,5
,6
,7
,8
,9
,10
,11
,12
,24
,36
. - instance
Charge StringType Prepaid Renew Flag - Auto renewal flag. Valid values:
NOTIFY_AND_AUTO_RENEW
: notify upon expiration and renew automatically,NOTIFY_AND_MANUAL_RENEW
: notify upon expiration but do not renew automatically,DISABLE_NOTIFY_AND_MANUAL_RENEW
: neither notify upon expiration nor renew automatically. Default value:NOTIFY_AND_MANUAL_RENEW
. If this parameter is specified asNOTIFY_AND_AUTO_RENEW
, the instance will be automatically renewed on a monthly basis if the account balance is sufficient. NOTE: it only works when instance_charge_type is set toPREPAID
. - instance
Name String - Name of the CVMs.
- internet
Charge StringType - Charge types for network traffic. Available values include
TRAFFIC_POSTPAID_BY_HOUR
. - internet
Max NumberBandwidth Out - Max bandwidth of Internet access in Mbps. Default is 0.
- key
Ids List<String> - ID list of keys, should be set if
password
not set. - password String
- Password to access, should be set if
key_ids
not set. - public
Ip BooleanAssigned - Specify whether to assign an Internet IP address.
- security
Group List<String>Ids - Security groups to which a CVM instance belongs.
- system
Disk NumberSize - Volume of system disk in GB. Default is
50
. - system
Disk StringType - System disk type. For more information on limits of system disk types, see Storage Overview. Valid values:
LOCAL_BASIC
: local disk,LOCAL_SSD
: local SSD disk,CLOUD_SSD
: SSD,CLOUD_PREMIUM
: Premium Cloud Storage. NOTE:CLOUD_BASIC
,LOCAL_BASIC
andLOCAL_SSD
are deprecated. - user
Data String - ase64-encoded User Data text, the length limit is 16KB.
KubernetesClusterWorkerConfigDataDisk, KubernetesClusterWorkerConfigDataDiskArgs
- Auto
Format boolAnd Mount - Indicate whether to auto format and mount or not. Default is
false
. - Disk
Partition string - The name of the device or partition to mount.
- Disk
Size double - Volume of disk in GB. Default is
0
. - Disk
Type string - Types of disk, available values:
CLOUD_PREMIUM
andCLOUD_SSD
andCLOUD_HSSD
andCLOUD_TSSD
. - Encrypt bool
- Indicates whether to encrypt data disk, default
false
. - File
System string - File system, e.g.
ext3/ext4/xfs
. - Kms
Key stringId - ID of the custom CMK in the format of UUID or
kms-abcd1234
. This parameter is used to encrypt cloud disks. - Mount
Target string - Mount target.
- Snapshot
Id string - Data disk snapshot ID.
- Auto
Format boolAnd Mount - Indicate whether to auto format and mount or not. Default is
false
. - Disk
Partition string - The name of the device or partition to mount.
- Disk
Size float64 - Volume of disk in GB. Default is
0
. - Disk
Type string - Types of disk, available values:
CLOUD_PREMIUM
andCLOUD_SSD
andCLOUD_HSSD
andCLOUD_TSSD
. - Encrypt bool
- Indicates whether to encrypt data disk, default
false
. - File
System string - File system, e.g.
ext3/ext4/xfs
. - Kms
Key stringId - ID of the custom CMK in the format of UUID or
kms-abcd1234
. This parameter is used to encrypt cloud disks. - Mount
Target string - Mount target.
- Snapshot
Id string - Data disk snapshot ID.
- auto
Format BooleanAnd Mount - Indicate whether to auto format and mount or not. Default is
false
. - disk
Partition String - The name of the device or partition to mount.
- disk
Size Double - Volume of disk in GB. Default is
0
. - disk
Type String - Types of disk, available values:
CLOUD_PREMIUM
andCLOUD_SSD
andCLOUD_HSSD
andCLOUD_TSSD
. - encrypt Boolean
- Indicates whether to encrypt data disk, default
false
. - file
System String - File system, e.g.
ext3/ext4/xfs
. - kms
Key StringId - ID of the custom CMK in the format of UUID or
kms-abcd1234
. This parameter is used to encrypt cloud disks. - mount
Target String - Mount target.
- snapshot
Id String - Data disk snapshot ID.
- auto
Format booleanAnd Mount - Indicate whether to auto format and mount or not. Default is
false
. - disk
Partition string - The name of the device or partition to mount.
- disk
Size number - Volume of disk in GB. Default is
0
. - disk
Type string - Types of disk, available values:
CLOUD_PREMIUM
andCLOUD_SSD
andCLOUD_HSSD
andCLOUD_TSSD
. - encrypt boolean
- Indicates whether to encrypt data disk, default
false
. - file
System string - File system, e.g.
ext3/ext4/xfs
. - kms
Key stringId - ID of the custom CMK in the format of UUID or
kms-abcd1234
. This parameter is used to encrypt cloud disks. - mount
Target string - Mount target.
- snapshot
Id string - Data disk snapshot ID.
- auto_
format_ booland_ mount - Indicate whether to auto format and mount or not. Default is
false
. - disk_
partition str - The name of the device or partition to mount.
- disk_
size float - Volume of disk in GB. Default is
0
. - disk_
type str - Types of disk, available values:
CLOUD_PREMIUM
andCLOUD_SSD
andCLOUD_HSSD
andCLOUD_TSSD
. - encrypt bool
- Indicates whether to encrypt data disk, default
false
. - file_
system str - File system, e.g.
ext3/ext4/xfs
. - kms_
key_ strid - ID of the custom CMK in the format of UUID or
kms-abcd1234
. This parameter is used to encrypt cloud disks. - mount_
target str - Mount target.
- snapshot_
id str - Data disk snapshot ID.
- auto
Format BooleanAnd Mount - Indicate whether to auto format and mount or not. Default is
false
. - disk
Partition String - The name of the device or partition to mount.
- disk
Size Number - Volume of disk in GB. Default is
0
. - disk
Type String - Types of disk, available values:
CLOUD_PREMIUM
andCLOUD_SSD
andCLOUD_HSSD
andCLOUD_TSSD
. - encrypt Boolean
- Indicates whether to encrypt data disk, default
false
. - file
System String - File system, e.g.
ext3/ext4/xfs
. - kms
Key StringId - ID of the custom CMK in the format of UUID or
kms-abcd1234
. This parameter is used to encrypt cloud disks. - mount
Target String - Mount target.
- snapshot
Id String - Data disk snapshot ID.
KubernetesClusterWorkerInstancesList, KubernetesClusterWorkerInstancesListArgs
- Failed
Reason string - Information of the cvm when it is failed.
- Instance
Id string - ID of the cvm.
- Instance
Role string - Role of the cvm.
- Instance
State string - State of the cvm.
- Lan
Ip string - LAN IP of the cvm.
- Failed
Reason string - Information of the cvm when it is failed.
- Instance
Id string - ID of the cvm.
- Instance
Role string - Role of the cvm.
- Instance
State string - State of the cvm.
- Lan
Ip string - LAN IP of the cvm.
- failed
Reason String - Information of the cvm when it is failed.
- instance
Id String - ID of the cvm.
- instance
Role String - Role of the cvm.
- instance
State String - State of the cvm.
- lan
Ip String - LAN IP of the cvm.
- failed
Reason string - Information of the cvm when it is failed.
- instance
Id string - ID of the cvm.
- instance
Role string - Role of the cvm.
- instance
State string - State of the cvm.
- lan
Ip string - LAN IP of the cvm.
- failed_
reason str - Information of the cvm when it is failed.
- instance_
id str - ID of the cvm.
- instance_
role str - Role of the cvm.
- instance_
state str - State of the cvm.
- lan_
ip str - LAN IP of the cvm.
- failed
Reason String - Information of the cvm when it is failed.
- instance
Id String - ID of the cvm.
- instance
Role String - Role of the cvm.
- instance
State String - State of the cvm.
- lan
Ip String - LAN IP of the cvm.
Import
tke cluster can be imported, e.g.
$ pulumi import tencentcloud:index/kubernetesCluster:KubernetesCluster example cls-n2h4jbtk
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- tencentcloud tencentcloudstack/terraform-provider-tencentcloud
- License
- Notes
- This Pulumi package is based on the
tencentcloud
Terraform Provider.