tencent cloud

UpdateAddon
Last updated: 2025-10-30 22:04:25
UpdateAddon
Last updated: 2025-10-30 22:04:25

1. API Description

Domain name for API request: tke.intl.tencentcloudapi.com.

This API is used to update parameters and version of an add-on.

A maximum of 20 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common Params. The value used for this API: UpdateAddon.
Version Yes String Common Params. The value used for this API: 2018-05-25.
Region Yes String Common Params. For more information, please see the list of regions supported by the product. This API only supports: ap-bangkok, ap-beijing, ap-chengdu, ap-chongqing, ap-guangzhou, ap-hongkong, ap-jakarta, ap-nanjing, ap-seoul, ap-shanghai, ap-shanghai-fsi, ap-shenzhen-fsi, ap-singapore, ap-tokyo, eu-frankfurt, na-ashburn, na-siliconvalley, sa-saopaulo.
ClusterId Yes String Cluster ID
AddonName Yes String Add-on name
AddonVersion No String addon version (default does not update if not passed. if AddonVersion is not passed, RawValues must be passed.).
RawValues No String Parameters of the addon, which is a base64-transcoded string in json format. (the addon parameters are obtained through DescribeAddonValues. when RawValues is not passed, AddonVersion must be provided.).
UpdateStrategy No String The update policy for the addon parameter supports two strategies: replace and merge. the default value is merge, which is compatible with old version apis. replace: use new RawValues to fully replace the original RawValues of the addon. merge: add or update the corresponding parameters in the original RawValues of the addon based on new RawValues.
DryRun No Boolean Specifies whether to only perform an update check. when set to true, only the check is performed without updating the component.

3. Output Parameters

Parameter Name Type Description
RequestId String The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.

4. Example

Example1 Update cbs Component Parameters

When updating the parameters of the cbs component, it is supported to configure custom parameters through RawValues. For example, to modify the tolerance scheduling setting, you can encode {"tolerations":[{"effect":"NoExecute","key":"gpu-not-ready","operator":"Equal","tolerationSeconds":300,"value":"true"},{"key":"ip-not-ready","operator":"Exists"}]} in base64 and then put it into the RawValues parameter. The custom parameters supported by the cbs component are described as follows:{ "tolerations": [ { "effect": "string, for example: NoExecute", "key": "string, tag key, for example: gpu-not-ready", "operator": "string, for example: Equal", "tolerationSeconds": "int, for example: 300", "value": "string, tag value, for example: true" }, { "key": "string, tag key, for example: ip-not-ready", "operator": "string, for example: Exists" } ] }

Input Example

POST / HTTP/1.1
Host: tke.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: UpdateAddon
<Common request parameters>

{
    "ClusterId": "cls-12345678",
    "AddonName": "cbs",
    "RawValues": "eyJ0b2xlcmF0aW9ucyI6W3siZWZmZWN0IjoiTm9FeGVjdXRlIiwia2V5IjoiZ3B1LW5vdC1yZWFkeSIsIm9wZXJhdG9yIjoiRXF1YWwiLCJ0b2xlcmF0aW9uU2Vjb25kcyI6MzAwLCJ2YWx1ZSI6InRydWUifSx7ImtleSI6ImlwLW5vdC1yZWFkeSIsIm9wZXJhdG9yIjoiRXhpc3RzIn1dfQ==",
    "UpdateStrategy": "merge"
}

Output Example

{
    "Response": {
        "RequestId": "f55aaa93-c681-47c9-860a-59ae16af648"
    }
}

Example2 Update eniipamd Component Parameters

When updating the parameters of the eniipamd component, it is supported to configure custom parameters through RawValues. For example, to clear the configured security group, you can encode {"vpcCni":{"securityGroups":{"securityGroups":[]}}} in base64 and put it into the RawValues parameter. The custom parameters supported by the eniipamd component are described as follows:{"clusterId": "string, Cluster ID, for example: cls-12345678", "vpcCni": {"vpcId": "string, the ID of the VPC, such as: vpc-qbc3zefo","enableVpcCni": "bool, whether to enable VPC CNI, for example: true", "routeEni": {"ipMinWarmTarget": "int, the minimum prebound value for the auxiliary IP of the shared network interface of the new nodes, for example: 5","ipMaxWarmTarget": "int, the maximum pre-bound value of auxiliary IP for shared network interface of new nodes, for example: 5" }, "ipam": {"subnetIds": "array, subnet ID list used for IP address allocation, for example: [\"subnet-qbc3zefo\"]" }, "securityGroups": {"enableSecurityGroups": "bool, whether to enable security groups, for example: true", "securityGroups": "array, security group IDs, for example: [\"sg-qbc3zefo\"]" } }, "agent": { "kubeClient": {"masterAddr": "string, primary node address of kubeClient, for example: 169.254.128.54:60002" } }}

Input Example

POST / HTTP/1.1
Host: tke.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: UpdateAddon
<Common request parameters>

{
    "ClusterId": "cls-12345678",
    "AddonName": "eniipamd",
    "RawValues": "eyJ2cGNDbmkiOnsic2VjdXJpdHlHcm91cHMiOnsic2VjdXJpdHlHcm91cHMiOltdfX19",
    "UpdateStrategy": "merge"
}

Output Example

{
    "Response": {
        "RequestId": "f55aaa93-c681-47c9-860a-59ae16ade268"
    }
}

Example3 Update tke-log-agent Component Parameters

When updating the parameters of the tke-log-agent component, it is supported to configure custom parameters through RawValues. For example, to enable kafkalistener, you can encode {"kafkalistener":{"enabled":true}} in base64 and then put it into the RawValues parameter. The custom parameters supported by the tke-log-agent component are described as follows:{ "global": {"clsHost": "string, cls service domain name, for example: ap-chengdu.cls.tencentyun.com", "cluster": {"clustertype": "string, cluster management type, for example: MANAGED_CLUSTER or INDEPENDENT_CLUSTER","kubeminor": "string, cluster edition, for example: minor 30.0","kubeversion": "string, the k8s version of the cluster, for example: 1.30.0","type": "string, cluster type, for example: tke or eks" },"clusterID": "string, Cluster ID, for example: cls-12345678","hostNetwork": "bool, whether to use hostNetwork, for example: false","localRegion": "string, the region of the cluster, for example: ap-chengdu","registry": "string, mirror repository, for example: ccr.ccs.tencentyun.com","sources": "string, authentication method, for example: norm" }, "kafkalistener": {"enabled": "bool, whether to enable kafka listener, for example: true" }, "logAgent": {"enabled": "bool, whether to enable logAgent, for example: true" }, "loglistener": {"enabled": "bool, whether to enable loglistener, for example: false" }, "provisioner": {"replicaCount": "int, the number of cls-provisioner replicas, for example: 2","sources": "string, the authentication method for cls-provisioner, for example: norm" }}

Input Example

POST / HTTP/1.1
Host: tke.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: UpdateAddon
<Common request parameters>

{
    "ClusterId": "cls-12345678",
    "AddonName": "tke-log-agent",
    "RawValues": "eyJrYWZrYWxpc3RlbmVyIjp7ImVuYWJsZWQiOnRydWV9fQ==",
    "UpdateStrategy": "merge"
}

Output Example

{
    "Response": {
        "RequestId": "f55aaa93-c681-47c9-860a-59ae16ajgf1"
    }
}

Example4 Update cluster-autoscaler Component Parameters

When updating the parameters of the tke-log-agent component, it is supported to configure custom parameters through RawValues. For example, to disable scale-in, you can encode {"extraArgs":{"scale-down-enabled":false}} in base64 and then put it into the RawValues parameter. The custom parameters supported by the cluster-autoscaler component are as follows:{ "extraArgs": {"expander": "string, scaling policy, for example: random","ignore-daemonsets-utilization": "bool, whether daemonset type is not included in utilization calculation, for example: false","max-empty-bulk-delete": "int, the maximum concurrent scale-down number of empty nodes, for example: 10","scale-down-delay-after-add": "string, the waiting time before triggering scale-in after scaling out, for example: 10m","scale-down-enabled": "bool, enable scale-down capacity, for example: false","scale-down-unneeded-time": "string, the scale-in time triggered by node continuous idle, for example: 10m","scale-down-utilization-threshold": "float, the utilization threshold that triggers scale-in for a node, for example: 0.5","skip-nodes-with-local-storage": "bool, do not scale in nodes that contain local storage, for example: true","skip-nodes-with-system-pods": "bool, do not scale in nodes that have pods not managed by daemonset in the kube-system namespace, for example: true" }}

Input Example

POST / HTTP/1.1
Host: tke.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: UpdateAddon
<Common request parameters>

{
    "ClusterId": "cls-12345678",
    "AddonName": "cluster-autoscaler",
    "RawValues": "eyJleHRyYUFyZ3MiOnsic2NhbGUtZG93bi1lbmFibGVkIjpmYWxzZX19",
    "UpdateStrategy": "merge"
}

Output Example

{
    "Response": {
        "RequestId": "b0a2e412-6e5e-4a93-9a22-edf5102e9eae"
    }
}

5. Developer Resources

SDK

TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

There is no error code related to the API business logic. For other error codes, please see Common Error Codes.

Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback