Installing an Add-on Instance
Function
This API is used to install an add-on instance.
URI
POST /v1/addons
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
X-Auth-Token |
No |
String |
Identity authentication information. Requests for calling an API can be authenticated using either a token or AK/SK. If token-based authentication is used, this parameter is mandatory and must be set to a user token. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
kind |
Yes |
String |
API type. The value must be Addon. |
|
apiVersion |
Yes |
String |
API version. The value must be v3. |
|
metadata |
Yes |
ObjectMeta object |
Resource metadata |
|
spec |
No |
AddonInstanceSpec object |
Desired status of the add-on instance |
|
status |
No |
AddonInstanceStatus object |
Actual status of the add-on instance |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
uid |
No |
String |
Resource ID |
|
name |
No |
String |
Resource name |
|
generateName |
No |
String |
If no name is provided, the server uses the prefix to generate a unique name. |
|
namespace |
No |
String |
Namespace |
|
labels |
No |
Map<String,String> |
Label |
|
annotations |
No |
Map<String,String> |
Annotation |
|
creationTimestamp |
No |
String |
Creation time |
|
updateTimestamp |
No |
String |
Update time |
|
resourceVersion |
No |
String |
Internal version of a resource |
|
generation |
No |
String |
Generation of the desired resource state |
|
managedFields |
No |
Array of ManagedFieldsEntry objects |
Fields managed by workflows |
|
ownerReferences |
No |
Array of OwnerReference objects |
Ownership, dependencies, and garbage collection mechanism of objects. It supports resource management by the controller. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
manager |
No |
String |
Manager name |
|
operation |
No |
String |
Operation type that causes this entry being created. The value can only be Apply or Update. |
|
apiVersion |
No |
String |
Resource API version used by a manager for defining fields |
|
time |
No |
String |
Timestamp when this entry was created or last updated |
|
fieldsType |
No |
String |
Field structure format. The value is fixed at "FieldsV1". |
|
fieldsV1 |
No |
Object |
Information about the managed fields |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
apiVersion |
No |
String |
API version of the referent |
|
kind |
No |
String |
Type of the referent |
|
name |
No |
String |
Name of the referent |
|
uid |
No |
String |
UID of the referent |
|
controller |
No |
Boolean |
If the value is true, this reference points to the controller that manages the resource. |
|
blockOwnerDeletion |
No |
Boolean |
If the value is true and the owner has a finalizer named foregroundDeletion, the owner cannot be deleted until this reference is removed. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
clusterID |
No |
String |
Cluster ID |
|
version |
No |
String |
Add-on version |
|
addonTemplateName |
No |
String |
Add-on template name |
|
addonTemplateType |
No |
String |
Add-on template type |
|
addonTemplateLogo |
No |
String |
Add-on template logo |
|
addonTemplateLabels |
No |
Array of strings |
Add-on template label |
|
description |
No |
String |
Description |
|
values |
No |
Map<String,Object> |
Add-on instance configuration parameters |
|
parameters |
No |
ReleaseParams object |
Release parameters |
|
namespace |
No |
String |
Namespace |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
dry_run |
No |
Boolean |
Whether to simulate only the installation process |
|
replace |
No |
Boolean |
Whether to allow the reuse of existing names |
|
recreate |
No |
Boolean |
Whether to forcibly recreate resources |
|
no_hooks |
No |
Boolean |
Whether hooks are forbidden |
|
reset_values |
No |
Boolean |
Used for resetting values during the update |
|
name_template |
No |
String |
Name template of the resources to be published |
|
release_version |
No |
Integer |
Source version for rollback |
|
include_hooks |
No |
Boolean |
Whether hooks are allowed during the update or deletion |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
status |
No |
String |
Status |
|
Reason |
No |
String |
Reason for the change |
|
message |
No |
String |
Change details |
|
targetVersions |
No |
Array of strings |
Target version |
|
currentVersion |
No |
AddonVersion object |
Current version |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
id |
No |
String |
Add-on package version ID |
|
version |
No |
String |
Add-on version |
|
input |
No |
Map<String,Object> |
Input |
|
stable |
No |
Boolean |
Whether the add-on version is a stable release |
|
translate |
No |
Map<String,Object> |
Translation information used by the GUI |
|
supportVersions |
No |
Array of SupportVersion objects |
Supported cluster types and versions |
|
creationTimestamp |
No |
String |
Record creation time |
|
updateTimestamp |
No |
String |
Record update time |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
category |
No |
String |
Supported cluster types |
|
clusterType |
No |
String |
Supported cluster types (such as BareMetal, VirtualMachine, and Windows) |
|
clusterVersion |
No |
Array of strings |
Supported cluster versions (regular expressions are supported, for example, .* matches all cluster versions) |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
kind |
String |
API type. The value must be Addon. |
|
apiVersion |
String |
API version. The value must be v3. |
|
metadata |
ObjectMeta object |
Resource metadata |
|
spec |
AddonInstanceSpec object |
Desired status of the add-on instance |
|
status |
AddonInstanceStatus object |
Actual status of the add-on instance |
|
Parameter |
Type |
Description |
|---|---|---|
|
uid |
String |
Resource ID |
|
name |
String |
Resource name |
|
generateName |
String |
If no name is provided, the server uses the prefix to generate a unique name. |
|
namespace |
String |
Namespace |
|
labels |
Map<String,String> |
Label |
|
annotations |
Map<String,String> |
Annotation |
|
creationTimestamp |
String |
Creation time |
|
updateTimestamp |
String |
Update time |
|
resourceVersion |
String |
Internal version of a resource |
|
generation |
String |
Generation of the desired resource state |
|
managedFields |
Array of ManagedFieldsEntry objects |
Fields managed by workflows |
|
ownerReferences |
Array of OwnerReference objects |
Ownership, dependencies, and garbage collection mechanism of objects. It supports resource management by the controller. |
|
Parameter |
Type |
Description |
|---|---|---|
|
manager |
String |
Manager name |
|
operation |
String |
Operation type that causes this entry being created. The value can only be Apply or Update. |
|
apiVersion |
String |
Resource API version used by a manager for defining fields |
|
time |
String |
Timestamp when this entry was created or last updated |
|
fieldsType |
String |
Field structure format. The value is fixed at "FieldsV1". |
|
fieldsV1 |
Object |
Information about the managed fields |
|
Parameter |
Type |
Description |
|---|---|---|
|
apiVersion |
String |
API version of the referent |
|
kind |
String |
Type of the referent |
|
name |
String |
Name of the referent |
|
uid |
String |
UID of the referent |
|
controller |
Boolean |
If the value is true, this reference points to the controller that manages the resource. |
|
blockOwnerDeletion |
Boolean |
If the value is true and the owner has a finalizer named foregroundDeletion, the owner cannot be deleted until this reference is removed. |
|
Parameter |
Type |
Description |
|---|---|---|
|
clusterID |
String |
Cluster ID |
|
version |
String |
Add-on version |
|
addonTemplateName |
String |
Add-on template name |
|
addonTemplateType |
String |
Add-on template type |
|
addonTemplateLogo |
String |
Add-on template logo |
|
addonTemplateLabels |
Array of strings |
Add-on template label |
|
description |
String |
Description |
|
values |
Map<String,Object> |
Add-on instance configuration parameters |
|
parameters |
ReleaseParams object |
Release parameters |
|
namespace |
String |
Namespace |
|
Parameter |
Type |
Description |
|---|---|---|
|
dry_run |
Boolean |
Whether to simulate only the installation process |
|
replace |
Boolean |
Whether to allow the reuse of existing names |
|
recreate |
Boolean |
Whether to forcibly recreate resources |
|
no_hooks |
Boolean |
Whether hooks are forbidden |
|
reset_values |
Boolean |
Used for resetting values during the update |
|
name_template |
String |
Name template of the resources to be published |
|
release_version |
Integer |
Source version for rollback |
|
include_hooks |
Boolean |
Whether hooks are allowed during the update or deletion |
|
Parameter |
Type |
Description |
|---|---|---|
|
status |
String |
Status |
|
Reason |
String |
Reason for the change |
|
message |
String |
Change details |
|
targetVersions |
Array of strings |
Target version |
|
currentVersion |
AddonVersion object |
Current version |
|
Parameter |
Type |
Description |
|---|---|---|
|
id |
String |
Add-on package version ID |
|
version |
String |
Add-on version |
|
input |
Map<String,Object> |
Input |
|
stable |
Boolean |
Whether the add-on version is a stable release |
|
translate |
Map<String,Object> |
Translation information used by the GUI |
|
supportVersions |
Array of SupportVersion objects |
Supported cluster types and versions |
|
creationTimestamp |
String |
Record creation time |
|
updateTimestamp |
String |
Record update time |
|
Parameter |
Type |
Description |
|---|---|---|
|
category |
String |
Supported cluster types |
|
clusterType |
String |
Supported cluster types (such as BareMetal, VirtualMachine, and Windows) |
|
clusterVersion |
Array of strings |
Supported cluster versions (regular expressions are supported, for example, .* matches all cluster versions) |
Status code: 400
|
Parameter |
Type |
Description |
|---|---|---|
|
- |
String |
- |
Status code: 500
|
Parameter |
Type |
Description |
|---|---|---|
|
- |
String |
- |
Example Requests
Installing an add-on instance
POST https:///ucs.myhuaweicloud.com/v1/addons
{
"kind" : "Addon",
"apiVersion" : "v3",
"metadata" : {
"annotations" : {
"addon.install/type" : "install"
}
},
"spec" : {
"clusterID" : "0ddf73d6-7427-11f0-bf90-0255ac100b09",
"version" : "1.19.6",
"addonTemplateName" : "volcano",
"values" : {
"basic" : {
"platform" : "linux-amd64",
"swr_addr" : "",
"swr_user" : "hwofficial",
"rbac_enabled" : true,
"cluster_version" : "v1.31"
},
"flavor" : {
"description" : "For 50 nodes, 5000 pods in cluster",
"name" : "Node50",
"recommend_cluster_flavor_types" : [ "small" ],
"resources" : [ {
"name" : "volcano-scheduler",
"limitsCpu" : "2000m",
"requestsCpu" : "500m",
"replicas" : 2,
"limitsMem" : "2000Mi",
"requestsMem" : "500Mi"
}, {
"name" : "volcano-controller",
"limitsCpu" : "2000m",
"requestsCpu" : "500m",
"replicas" : 2,
"limitsMem" : "2000Mi",
"requestsMem" : "500Mi"
}, {
"name" : "volcano-admission",
"limitsCpu" : "500m",
"requestsCpu" : "200m",
"replicas" : 2,
"limitsMem" : "500Mi",
"requestsMem" : "500Mi"
} ],
"size" : "small",
"category" : [ "CCE", "Turbo" ]
}
}
}
}
Example Responses
Status code: 200
Add-on instance information returned
{
"kind" : "Addon",
"apiVersion" : "v3",
"metadata" : {
"uid" : "4972d9b2-59ed-4735-bba0-4bb1cf30f90d",
"name" : "volcano",
"creationTimestamp" : "2025-10-17T03:52:52Z",
"updateTimestamp" : "2025-10-17T03:52:52Z"
},
"spec" : {
"clusterID" : "0ddf73d6-7427-11f0-bf90-0255ac100b09",
"version" : "1.19.6",
"addonTemplateName" : "volcano",
"addonTemplateType" : "helm",
"addonTemplateLogo" : "https://xxxxxx.svg",
"addonTemplateLabels" : [ "ContainerSchedulerAndElasticity" ],
"description" : "Volcano is a batch system built on Kubernetes. It provides a suite of mechanisms currently missing from Kubernetes that are commonly required by many classes of batch & elastic workload including machine learning/deep learning, bioinformatics/genomics, other big data applications.",
"values" : {
"basic" : {
"cluster_version" : "v1.31",
"platform" : "linux-amd64",
"rbac_enabled" : true,
"swr_addr" : "",
"swr_user" : "hwofficial"
},
"flavor" : {
"category" : [ "CCE", "Turbo" ],
"description" : "For 50 nodes, 5000 pods in cluster",
"name" : "Node50",
"recommend_cluster_flavor_types" : [ "small" ],
"resources" : [ {
"limitsCpu" : "2000m",
"limitsMem" : "2000Mi",
"name" : "volcano-scheduler",
"replicas" : 2,
"requestsCpu" : "500m",
"requestsMem" : "500Mi"
}, {
"limitsCpu" : "2000m",
"limitsMem" : "2000Mi",
"name" : "volcano-controller",
"replicas" : 2,
"requestsCpu" : "500m",
"requestsMem" : "500Mi"
}, {
"limitsCpu" : "500m",
"limitsMem" : "500Mi",
"name" : "volcano-admission",
"replicas" : 2,
"requestsCpu" : "200m",
"requestsMem" : "500Mi"
} ],
"size" : "small"
}
}
},
"status" : {
"status" : "installing",
"Reason" : "",
"message" : "",
"targetVersions" : null
}
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
Add-on instance information returned |
|
400 |
Client request error. The server could not execute the request. |
|
500 |
Internal server error |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot