Skip to content

Commit 4a2d199

Browse files
committed
add node pool global config example
1 parent 0fcdf26 commit 4a2d199

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

examples/tencentcloud-tke/main.tf

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,58 @@ resource "tencentcloud_kubernetes_as_scaling_group" "test" {
232232

233233
}
234234

235+
labels = {
236+
"test1" = "test1",
237+
"test2" = "test2",
238+
}
239+
}
240+
241+
#example for node pool global config
242+
resource "tencentcloud_kubernetes_cluster" "test_node_pool_global_config" {
243+
vpc_id = var.vpc
244+
cluster_cidr = "10.1.0.0/16"
245+
cluster_max_pod_num = 32
246+
cluster_name = "test"
247+
cluster_desc = "test cluster desc"
248+
cluster_max_service_num = 32
249+
cluster_internet = true
250+
managed_cluster_internet_security_policies = ["3.3.3.3", "1.1.1.1"]
251+
cluster_deploy_type = "MANAGED_CLUSTER"
252+
253+
worker_config {
254+
count = 1
255+
availability_zone = var.availability_zone
256+
instance_type = var.default_instance_type
257+
system_disk_type = "CLOUD_SSD"
258+
system_disk_size = 60
259+
internet_charge_type = "TRAFFIC_POSTPAID_BY_HOUR"
260+
internet_max_bandwidth_out = 100
261+
public_ip_assigned = true
262+
subnet_id = var.subnet
263+
264+
data_disk {
265+
disk_type = "CLOUD_PREMIUM"
266+
disk_size = 50
267+
}
268+
269+
enhanced_security_service = false
270+
enhanced_monitor_service = false
271+
user_data = "dGVzdA=="
272+
password = "ZZXXccvv1212"
273+
}
274+
275+
node_pool_global_config {
276+
is_scale_in_enabled = true
277+
expander = "random"
278+
ignore_daemon_sets_utilization = true
279+
max_concurrent_scale_in = 5
280+
scale_in_delay = 15
281+
scale_in_unneeded_time = 15
282+
scale_in_utilization_threshold = 30
283+
skip_nodes_with_local_storage = false
284+
skip_nodes_with_system_pods = true
285+
}
286+
235287
labels = {
236288
"test1" = "test1",
237289
"test2" = "test2",

0 commit comments

Comments
 (0)