一、示例
resource "tencentcloud_kubernetes_serverless_node_pool" "example" { cluster_id = "cls-xxxxxx" name = "tf_example_serverless_node_pool" serverless_nodes = [{ display_name = "tf_example_serverless_node1" subnet_id = "subnet-xxxxxx" }, { display_name = "tf_example_serverless_node2" subnet_id = "subnet-xxxxxx" }] security_group_ids = ["sg-xxxxxx"] labels = { "label1" = "value1" "label2" = "value2" } taints = [{ key = "key1" value = "value1" effect = "NoSchedule" }]}
二、参数说明
| 类型 | 名称 | 数据类型 | 说明 |
| 必填 | region | string | 地域,如:ap-guangzhou,默认使用 provider 中定义的 region。也可以在 resource 中指定地域,覆盖默认设置 |
| 必填 | cluster_id | string | 集群 ID 示例值:cls-xxxxxx |
| 必填 | serverless_nodes | Schema[] | Serverless 节点列表Schema 类型详见:ServerlessNodeSchema |
| 可选 | availability_zone | string | 可用区 |
| 可选 | count | int | 资源数量,默认为 1 如果为 0 则不创建资源 |
| 可选 | activity_id | int | 计费活动 ID,保留字段 |
| 可选 | name | string | Serverless 节点池名称 示例值:tf_example_serverless_node_pool |
| 可选 | security_group_ids | string[] | 安全组 ID 列表 示例值:["sg-xxxxxx"] |
| 可选 | labels | Record<string, string> | 节点 Labels(键值对) |
| 可选 | taints | Schema[] | 节点污点Schema 类型详见:TaintSchema |
| 生成 | id | string | 资源实例 ID |
| 生成 | create_time | string | 资源创建时间 |
| 生成 | life_state | string | 节点池生命周期状态 示例值:normal |
三、描述
Serverless 节点配置。
四、参数说明
| 类型 | 名称 | 数据类型 | 说明 |
| 必填 | display_name | string | 节点展示名称 示例值:tf_example_serverless_node1 |
| 必填 | subnet_id | string | 子网 ID 示例值:subnet-xxxxxx |
五、描述
kubernetes Taint,可查看 参数定义。
六、参数说明
| 类型 | 名称 | 数据类型 | 说明 |
| 可选 | key | string | Taint 的 Key 示例值:key1 |
| 可选 | value | string | Taint 的 Value 示例值:value1 |
| 可选 | effect | string | Taint 的 Effect 示例值:NoSchedule |