tencentcloud_kubernetes_addon_config resource to update the component configuration.Scenario | Recommended Resource |
Install or manage component lifecycle | tencentcloud_kubernetes_addon |
Update configuration parameters of installed components | tencentcloud_kubernetes_addon_config |
raw_values accepts a string in JSON format, which contains the Values configuration of the corresponding Helm Chart for the component.resource "tencentcloud_kubernetes_addon_config" "tke_event_collector" {cluster_id = "cls-xxxxxxxx" # Replace it with your cluster ID.addon_name = "tke-event-collector"raw_values = jsonencode({replicaCount = 1resources = {requests = {cpu = "100m"memory = "128Mi"}limits = {cpu = "200m"memory = "256Mi"}}})}
raw_values, enter the Helm Values content in JSON format. Specify only the parameters that you want to modify. Unspecified parameters will retain their default values.tencentcloud_kubernetes_addon_config resource.tencentcloud_kubernetes_addon_attachment resource.cls-xxxxxxxx), and the tke-event-collector component has been installed in the cluster.resource "tencentcloud_kubernetes_addon_config" "event_collector" {cluster_id = "cls-xxxxxxxx" # Replace it with your cluster ID.addon_name = "kube-event-collector"raw_values_type = "json"raw_values = jsonencode({global = {# CLS Logset and Log Topic ConfigurationclsLogSetRegion = "ap-guangzhou" # The region where the CLS logset is stored.clsLogSetId = "logset-xxxxxxxx" # Logset ID.clsTopicId = "topic-xxxxxxxx" # Log topic ID.}resources = {requests = {cpu = "50m"memory = "64Mi"}limits = {cpu = "100m"memory = "128Mi"}}})}
addon_name field, the Terraform addon name for tke-event-collector is kube-event-collector. Note the distinction.raw_values field accepts a string in JSON format, which contains the configurable parameters of the component.Parameter Path | Type | Description |
global.clsLogSetRegion | string | Region where the CLS logset resides, for example, "ap-guangzhou" |
global.clsLogSetId | string | CLS logset ID, for example, "logset-xxxxxxxx" |
global.clsTopicId | string | CLS log topic ID, for example, "topic-xxxxxxxx" |
resources.requests.cpu | string | CPU request of the container, for example, "50m" |
resources.requests.memory | string | Memory request of the container, for example, "64Mi" |
resources.limits.cpu | string | CPU limit of the container, for example, "100m" |
resources.limits.memory | string | Memory limit of the container, for example, "128Mi" |
raw_values, run terraform apply. Terraform will automatically compare and apply the changes without recreating resources.Apakah halaman ini membantu?
Anda juga dapat Menghubungi Penjualan atau Mengirimkan Tiket untuk meminta bantuan.
masukan