Specifying Add-ons to Be Installed During Cluster Creation
When creating a cluster, you can add a key-value pair to annotations of the metadata field in the request body to install an add-on in the cluster. The key is cluster.install.addons/install, and the value is a JSON array of AddonTemplate.
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
Value |
Yes |
JSON array of AddonTemplate string |
Add-on to be installed in the cluster. If this parameter is not specified, the CoreDNS and CCE Container Storage (Everest) add-ons are installed in the cluster by default. For details about the parameter values, see Table 2. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
addonTemplateName |
Yes |
String |
Add-on name. Options:
|
version |
No |
String |
Add-on version. To view the add-on version, log in to the CCE console, choose Add-ons in the navigation pane, click the name of the target add-on, and check the change history. If this parameter is left blank, the latest version is used by default. |
Example Request
Create a cluster using a VPC network and install CoreDNS and CCE Container Storage (Everest) in it.
{ "kind": "Cluster", "apiVersion": "v3", "metadata": { "name": "test", "annotations": { "cluster.install.addons.external/install": "[{\"addonTemplateName\":\"icagent\",\"extendParam\":{\"logSwitch\":\"false\",\"tDSEnable\":\"false\"}}]", "cluster.install.addons/install": "[{\"addonTemplateName\":\"coredns\",\"values\":{\"flavor\":{\"is_default\":false,\"name\":2500,\"recommend_cluster_flavor_types\":[\"small\"],\"replicas\":2,\"resources\":[{\"limitsCpu\":\"500m\",\"limitsMem\":\"512Mi\",\"name\":\"coredns\",\"replicas\":2,\"requestsCpu\":\"500m\",\"requestsMem\":\"512Mi\"}],\"size\":\"small\",\"category\":[\"CCE\",\"Turbo\"]}}},{\"addonTemplateName\":\"everest\"}]" } }, "spec": { "category": "CCE", "flavor": "cce.s1.small", "version": "v1.29", "type": "VirtualMachine", "hostNetwork": { "vpc": "*****", "subnet": "*****" }, "containerNetwork": { "mode": "vpc-router", "cidrs": [ { "cidr": "10.0.0.0/16" } ] }, "ipv6enable": false, "description": "", "billingMode": 0, "kubeProxyMode": "iptables", "extendParam": { "alpha.cce/fixPoolMask": "25", "enterpriseProjectId": "0" }, "authentication": { "mode": "rbac" }, "configurationsOverride": [ { "name": "kube-apiserver", "configurations": [ { "name": "support-overload", "value": true } ] } ], "deletionProtection": false, "serviceNetwork": { "IPv4CIDR": "10.247.0.0/16" } } }
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.