All Products
Search
Document Center

:Modify the configurations of a component

更新时间:Dec 12, 2023

You can call the ModifyClusterAddon operation to modify the configurations of a component that is installed in a cluster.

You can use this API operation to modify the components in a Container Service for Kubernetes (ACK) cluster or the control plane components in an ACK Pro cluster.

After you call this operation, the component may be redeployed and restarted. We recommend that you evaluate the impact before you call this operation.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request syntax

POST /clusters/cluster_id/components/component_id/config HTTP/1.1
Content-Type:application/json

{
  "config" : "String"
}

Request parameters

Table 1. Request path parameters
Parameter Type Required Example Description
cluster_id String Yes c71d616e629ff40d5b42d7bb87770****

The ID of the cluster.

component_id String Yes coredns

The ID of the component.

Table 2. Request body parameters
Parameter Type Required Example Description
config String No {"CpuRequest":"800m"}

The custom parameter settings that you want to use.

Set config to a JSON string.

Response syntax

HTTP/1.1 200 OK

Response parameters

Modify the configurations of a component

The following example shows how to modify the parameters of CoreDNS:

POST /clusters/c71d616e629ff40d5b42d7bb87770****/components/coredns/config HTTP/1.1
Host:cs.aliyuncs.com
Content-Type:application/json

{
  "config" : "{\"CpuRequest\":\"800m\"}"
}

Sample success responses

JSON format

HTTP/1.1 200 OK

Modify the parameters of a control plane component in an ACK Pro cluster

The following example shows how to modify the parameters of kube-apiserver in an ACK Pro cluster:

POST /clusters/c71d616e629ff40d5b42d7bb87770****/components/kube-apiserver/config HTTP/1.1
Host:cs.aliyuncs.com
Content-Type:application/json

{
  "config":"{\"maxRequestsInflight\":\"100\",\"requestTimeout\":\"30s\"}"
}

Sample success responses

JSON format

HTTP/1.1 200 OK

Error codes

For a list of error codes, see Service error codes.