All Products
Search
Document Center

:Install a component in an ACK cluster

更新時間:Dec 12, 2023

You can call the InstallClusterAddons to install a component in a specified Container Service for Kubernetes (ACK) cluster.

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/ClusterId/components/install HTTP/1.1
Content-Type:application/json

[ {
  "name" : "String",
  "version" : "String",
  "config" : "String"
} ]

Request parameters

Table 1. Request path parameters
ParameterTypeRequiredExampleDescription
ClusterIdStringYesc82e6987e2961451182edacd74faf****

The ID of the ACK cluster.

Table 2. Request body parameters
ParameterTypeRequiredExampleDescription
ArrayNo

The request body parameters.

nameStringYesags-metrics-collector

The name of the component that you want to install.

versionStringYesv1.0.0.2-cc3b2d6-aliyun

The version of the component.

Note You can call the DescribeClusterAddonsVersion operation to check the version of the component.
configStringNo{\"IngressDashboardEnabled\":\"true\",\"sls_project_name\":\"your_sls_project_name\"}"}

The custom component settings that you want to use. The value is a JSON string.

Response syntax

HTTP/1.1 200 OK

Response parameters

None

Examples

Sample requests

POST /clusters/c82e6987e2961451182edacd74faf****/components/install HTTP/1.1 
Content-Type:application/json
[ {
  "name" : "ags-metrics-collector",
  "version" : "v1.0.0.2-cc3b2d6-aliyun",
  "config" : "{\\\"IngressDashboardEnabled\\\":\\\"true\\\",\\\"sls_project_name\\\":\\\"your_sls_project_name\\\"}\"}"
} ]

Description of the sample request

POST /clusters/c3fb96524f9274b4495df0f12a6b5****/components/install?RegionId=cn-hangzhou --header "Content-Type=application/json;" --body '[{"name":"ack-node-problem-detector"}]'

Sample success responses

JSON format

HTTP/1.1 200 OK

Error codes

For a list of error codes, visit the API Error Center.