forked from docs/doc-exports
Reviewed-by: Eotvos, Oliver <oliver.eotvos@t-systems.com> Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com> Co-authored-by: Dong, Qiu Jian <qiujiandong1@huawei.com> Co-committed-by: Dong, Qiu Jian <qiujiandong1@huawei.com>
463 lines
33 KiB
HTML
463 lines
33 KiB
HTML
<a name="cce_02_0356"></a><a name="cce_02_0356"></a>
|
|
|
|
<h1 class="topictitle1">Updating a Specified Node Pool</h1>
|
|
<div id="body1587440508951"><div class="section" id="cce_02_0356__section1686113493165"><h4 class="sectiontitle">Function</h4><p id="cce_02_0356__p83383918711">This API is used to update a specified node pool.</p>
|
|
<div class="note" id="cce_02_0356__note815071332616"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="cce_02_0356__ul118961316938"><li id="cce_02_0356__li38961016438">The URL for cluster management is in the format of <strong id="cce_02_0356__b10265023947">https://Endpoint/uri</strong>. In the URL, <strong id="cce_02_0356__b1879728942">uri</strong> indicates the resource path, that is, the path for API access.</li><li id="cce_02_0356__li1794412813320">Currently, only the node pool name and scaling parameters in <strong id="cce_02_0356__b851413361632">spec</strong> can be updated, such as <strong id="cce_02_0356__b1646012479315">initialNodeCount, autoscaling, name, k8sTags, taints, login</strong>, and <strong id="cce_02_0356__b15323185519315">userTags</strong>.</li></ul>
|
|
</div></div>
|
|
</div>
|
|
<div class="section" id="cce_02_0356__section8403243161416"><h4 class="sectiontitle">URI</h4><p id="cce_02_0356__p23575517439">PUT /api/v3/projects/{project_id}/clusters/{cluster_id}/nodepools/{nodepool_id}</p>
|
|
<p id="cce_02_0356__p2037362514220"><a href="#cce_02_0356__table127923532918">Table 1</a> describes the parameters of this API.</p>
|
|
|
|
<div class="tablenoborder"><a name="cce_02_0356__table127923532918"></a><a name="table127923532918"></a><table cellpadding="4" cellspacing="0" summary="" id="cce_02_0356__table127923532918" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="cce_02_0356__row9792195314913"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.4.2.4.1.1"><p id="cce_02_0356__p07921153694">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="12%" id="mcps1.3.2.4.2.4.1.2"><p id="cce_02_0356__p1979216532917">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="68%" id="mcps1.3.2.4.2.4.1.3"><p id="cce_02_0356__p77922531296">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="cce_02_0356__row137928532918"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.4.1.1 "><p id="cce_02_0356__p579295315911">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="12%" headers="mcps1.3.2.4.2.4.1.2 "><p id="cce_02_0356__p137927531494">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="68%" headers="mcps1.3.2.4.2.4.1.3 "><p id="cce_02_0356__p8793153899">Project ID. For details about how to obtain the project ID, see <a href="cce_02_0271.html">How to Obtain Parameters in the API URI</a>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="cce_02_0356__row1410610454440"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.4.1.1 "><p id="cce_02_0356__p4106245124416">cluster_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="12%" headers="mcps1.3.2.4.2.4.1.2 "><p id="cce_02_0356__p11061345164415">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="68%" headers="mcps1.3.2.4.2.4.1.3 "><p id="cce_02_0356__p15106445114416">Cluster ID. For details about how to obtain the cluster ID, see <a href="cce_02_0271.html">How to Obtain Parameters in the API URI</a>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="cce_02_0356__row16968171161010"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.4.1.1 "><p id="cce_02_0356__p196921101017">nodepool_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="12%" headers="mcps1.3.2.4.2.4.1.2 "><p id="cce_02_0356__p15970201151012">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="68%" headers="mcps1.3.2.4.2.4.1.3 "><p id="cce_02_0356__p8970111121012">Node pool ID. For details about how to obtain the node pool ID, see <a href="cce_02_0269.html">Listing All Node Pools in a Specified Cluster</a>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="cce_02_0356__section947084713911"><h4 class="sectiontitle">Request</h4><p id="cce_02_0356__zh-cn_topic_0079614900_p54374860"><strong id="cce_02_0356__b162259487412">Request parameters</strong>:</p>
|
|
<p id="cce_02_0356__p132051734919"><a href="#cce_02_0356__table794104818135">Table 2</a> and <a href="#cce_02_0356__table1644211019">Table 3</a> lists the request parameters.</p>
|
|
|
|
<div class="tablenoborder"><a name="cce_02_0356__table794104818135"></a><a name="table794104818135"></a><table cellpadding="4" cellspacing="0" summary="" id="cce_02_0356__table794104818135" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Parameters in the request header</caption><thead align="left"><tr id="cce_02_0356__cce_02_0236_row55001954122614"><th align="left" class="cellrowborder" valign="top" width="18.5%" id="mcps1.3.3.4.2.5.1.1"><p id="cce_02_0356__cce_02_0236_p115009545264">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="14.249999999999998%" id="mcps1.3.3.4.2.5.1.2"><p id="cce_02_0356__cce_02_0236_p175001547265">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="10.84%" id="mcps1.3.3.4.2.5.1.3"><p id="cce_02_0356__cce_02_0236_p922311541187">String</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="56.410000000000004%" id="mcps1.3.3.4.2.5.1.4"><p id="cce_02_0356__cce_02_0236_p16500154162611">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="cce_02_0356__cce_02_0236_row199801811203412"><td class="cellrowborder" valign="top" width="18.5%" headers="mcps1.3.3.4.2.5.1.1 "><p id="cce_02_0356__cce_02_0236_p69808112344">Content-Type</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.249999999999998%" headers="mcps1.3.3.4.2.5.1.2 "><p id="cce_02_0356__cce_02_0236_p3980111103414">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="10.84%" headers="mcps1.3.3.4.2.5.1.3 "><p id="cce_02_0356__cce_02_0236_p133849541818">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="56.410000000000004%" headers="mcps1.3.3.4.2.5.1.4 "><p id="cce_02_0356__cce_02_0236_p169801011203416">Message body type (format).</p>
|
|
<p id="cce_02_0356__cce_02_0236_p1788220373510">Default: <strong id="cce_02_0356__cce_02_0236_b124918415616">application/json</strong></p>
|
|
</td>
|
|
</tr>
|
|
<tr id="cce_02_0356__cce_02_0236_row3500125412260"><td class="cellrowborder" valign="top" width="18.5%" headers="mcps1.3.3.4.2.5.1.1 "><p id="cce_02_0356__cce_02_0236_p105001654202618">X-Auth-Token</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.249999999999998%" headers="mcps1.3.3.4.2.5.1.2 "><p id="cce_02_0356__cce_02_0236_p20500954182618">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="10.84%" headers="mcps1.3.3.4.2.5.1.3 "><p id="cce_02_0356__cce_02_0236_p85221454684">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="56.410000000000004%" headers="mcps1.3.3.4.2.5.1.4 "><p id="cce_02_0356__cce_02_0236_p18824197845">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. For details on how to obtain a user token, see <a href="cce_02_0344.html">API Usage Guidelines</a>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="cce_02_0356__table1644211019"></a><a name="table1644211019"></a><table cellpadding="4" cellspacing="0" summary="" id="cce_02_0356__table1644211019" frame="border" border="1" rules="all"><caption><b>Table 3 </b>NodePool structure</caption><thead align="left"><tr id="cce_02_0356__row13647211510"><th align="left" class="cellrowborder" valign="top" width="19.06%" id="mcps1.3.3.5.2.5.1.1"><p id="cce_02_0356__p26442115115">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="11.58%" id="mcps1.3.3.5.2.5.1.2"><p id="cce_02_0356__p91938272444">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="24.97%" id="mcps1.3.3.5.2.5.1.3"><p id="cce_02_0356__p46415215116">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="44.39%" id="mcps1.3.3.5.2.5.1.4"><p id="cce_02_0356__p1864192116112">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="cce_02_0356__row20809211716"><td class="cellrowborder" valign="top" width="19.06%" headers="mcps1.3.3.5.2.5.1.1 "><p id="cce_02_0356__p17569275215">metadata</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="11.58%" headers="mcps1.3.3.5.2.5.1.2 "><p id="cce_02_0356__p15200026689">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="24.97%" headers="mcps1.3.3.5.2.5.1.3 "><p id="cce_02_0356__p1334385071712"><a href="#cce_02_0356__table13456192212">metadata</a> object</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="44.39%" headers="mcps1.3.3.5.2.5.1.4 "><p id="cce_02_0356__p82961949883">Metadata of the node pool.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="cce_02_0356__row12484123982118"><td class="cellrowborder" valign="top" width="19.06%" headers="mcps1.3.3.5.2.5.1.1 "><p id="cce_02_0356__p75691778211">spec</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="11.58%" headers="mcps1.3.3.5.2.5.1.2 "><p id="cce_02_0356__p519812264814">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="24.97%" headers="mcps1.3.3.5.2.5.1.3 "><p id="cce_02_0356__p1436685371011"><a href="#cce_02_0356__table620623542313">spec</a> object</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="44.39%" headers="mcps1.3.3.5.2.5.1.4 "><p id="cce_02_0356__p1829416499817">Parameters of the node pool.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="cce_02_0356__table13456192212"></a><a name="table13456192212"></a><table cellpadding="4" cellspacing="0" summary="" id="cce_02_0356__table13456192212" frame="border" border="1" rules="all"><caption><b>Table 4 </b>Data structure of the <strong id="cce_02_0356__b1477813513174">metadata</strong> field</caption><thead align="left"><tr id="cce_02_0356__row031056182217"><th align="left" class="cellrowborder" valign="top" width="19.8%" id="mcps1.3.3.6.2.5.1.1"><p id="cce_02_0356__p10814151115613">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="13.51%" id="mcps1.3.3.6.2.5.1.2"><p id="cce_02_0356__p19813951165614">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="21.85%" id="mcps1.3.3.6.2.5.1.3"><p id="cce_02_0356__p381265105617">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="44.84%" id="mcps1.3.3.6.2.5.1.4"><p id="cce_02_0356__p68111951165614">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="cce_02_0356__row11915579512"><td class="cellrowborder" valign="top" width="19.8%" headers="mcps1.3.3.6.2.5.1.1 "><p id="cce_02_0356__p14915157855">name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.51%" headers="mcps1.3.3.6.2.5.1.2 "><p id="cce_02_0356__p1540322987">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="21.85%" headers="mcps1.3.3.6.2.5.1.3 "><p id="cce_02_0356__p15915147656">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="44.84%" headers="mcps1.3.3.6.2.5.1.4 "><p id="cce_02_0356__p1383013514117">Node pool name.</p>
|
|
<p id="cce_02_0356__p783085191119">Naming rule: Enter 1 to 50 characters that starts with a lowercase letter and cannot end with a hyphen (-). Lowercase letters, digits, and hyphens (-) are allowed. The value cannot be <strong id="cce_02_0356__b15830135131110">DefaultPool</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="cce_02_0356__table620623542313"></a><a name="table620623542313"></a><table cellpadding="4" cellspacing="0" summary="" id="cce_02_0356__table620623542313" frame="border" border="1" rules="all"><caption><b>Table 5 </b>Data structure of the <strong id="cce_02_0356__b11905154481710">spec</strong> field</caption><thead align="left"><tr id="cce_02_0356__row520663552315"><th align="left" class="cellrowborder" valign="top" width="18.23%" id="mcps1.3.3.7.2.5.1.1"><p id="cce_02_0356__p1363450175710">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="12.41%" id="mcps1.3.3.7.2.5.1.2"><p id="cce_02_0356__p146333017572">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25.89%" id="mcps1.3.3.7.2.5.1.3"><p id="cce_02_0356__p26331602573">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="43.47%" id="mcps1.3.3.7.2.5.1.4"><p id="cce_02_0356__p1959819065711">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="cce_02_0356__row5117192925918"><td class="cellrowborder" valign="top" width="18.23%" headers="mcps1.3.3.7.2.5.1.1 "><p id="cce_02_0356__p311772965918">initialNodeCount</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="12.41%" headers="mcps1.3.3.7.2.5.1.2 "><p id="cce_02_0356__p1811792915595">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25.89%" headers="mcps1.3.3.7.2.5.1.3 "><p id="cce_02_0356__p14117122912595">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="43.47%" headers="mcps1.3.3.7.2.5.1.4 "><p id="cce_02_0356__p942619415113">Expected number of nodes in this node pool. The value cannot be greater than the maximum number of nodes allowed for the cluster.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="cce_02_0356__row79521721105"><td class="cellrowborder" valign="top" width="18.23%" headers="mcps1.3.3.7.2.5.1.1 "><p id="cce_02_0356__p6952525018">autoscaling</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="12.41%" headers="mcps1.3.3.7.2.5.1.2 "><p id="cce_02_0356__p09521821016">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25.89%" headers="mcps1.3.3.7.2.5.1.3 "><p id="cce_02_0356__p1920643502317">autoscaling object</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="43.47%" headers="mcps1.3.3.7.2.5.1.4 "><p id="cce_02_0356__p10423941151110">Auto scaling parameters.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="cce_02_0356__row12206153513232"><td class="cellrowborder" valign="top" width="18.23%" headers="mcps1.3.3.7.2.5.1.1 "><p id="cce_02_0356__p6206135142317">nodeTemplate</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="12.41%" headers="mcps1.3.3.7.2.5.1.2 "><p id="cce_02_0356__p612474161018">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25.89%" headers="mcps1.3.3.7.2.5.1.3 "><p id="cce_02_0356__p13234357570">nodeTemplate object</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="43.47%" headers="mcps1.3.3.7.2.5.1.4 "><p id="cce_02_0356__p183191542173818">Parameters of the node pool template.</p>
|
|
<p id="cce_02_0356__p251151212251">If <strong id="cce_02_0356__cce_02_0354_b913215386244">az </strong>is set to <strong id="cce_02_0356__cce_02_0354_b313283816249">random</strong>, when you create a node pool or update the number of nodes in a node pool, a scaling task is triggered. The system selects an AZ from all AZs where scaling is allowed to add nodes based on priorities.</p>
|
|
<div class="p" id="cce_02_0356__p19206135162314">AZs with a smaller number of existing nodes have a higher priority. If AZs have the same number of nodes, the system selects the AZ based on the AZ sequence. Example:<ul id="cce_02_0356__cce_02_0354_ul17620345102116"><li id="cce_02_0356__cce_02_0354_li36201445182118">Creating nodes in a node pool for the first time: Assume that AZ 1, AZ 2, and AZ 3 have available resources. These AZs have the same priority because they have no existing nodes. In this case, AZ 1 is selected by sequence to create all nodes to be added.</li><li id="cce_02_0356__cce_02_0354_li116594579212">Adding nodes to a node pool that already has nodes:<ul id="cce_02_0356__cce_02_0354_ul9304125919217"><li id="cce_02_0356__cce_02_0354_li9453545223">Assume that the node pool has 1 node in AZ 1, 3 in AZ 2, and 2 in AZ 3, and that resources in AZ 1 have been sold out. Only AZ 2 and AZ 3 are available for scaling. In this case, AZ 3 has a higher priority than AZ 2 because AZ 3 has less nodes. Therefore, all nodes to be added will be created in AZ 3.</li><li id="cce_02_0356__cce_02_0354_li98475172114">Assume that the node pool has 1 node in AZ 1, 2 in AZ 2, and 2 in AZ 3, and that resources in AZ 1 have been sold out. Only AZ 2 and AZ 3 are available for scaling. In this case, AZ 2 and AZ 3 have the same priority because they have the same number of nodes. Therefore, all nodes to be added will be created in AZ 2.</li></ul>
|
|
</li></ul>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="cce_02_0356__table1472543502018" frame="border" border="1" rules="all"><caption><b>Table 6 </b>Data structure of the <strong id="cce_02_0356__b2075185120170">autoscaling</strong> field</caption><thead align="left"><tr id="cce_02_0356__row574220353207"><th align="left" class="cellrowborder" valign="top" width="18.888111188881112%" id="mcps1.3.3.8.2.5.1.1"><p id="cce_02_0356__p1436044185710">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="12.438756124387561%" id="mcps1.3.3.8.2.5.1.2"><p id="cce_02_0356__p16359243573">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="23.807619238076192%" id="mcps1.3.3.8.2.5.1.3"><p id="cce_02_0356__p153581844577">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="44.86551344865513%" id="mcps1.3.3.8.2.5.1.4"><p id="cce_02_0356__p735715418577">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="cce_02_0356__row14742113519208"><td class="cellrowborder" valign="top" width="18.888111188881112%" headers="mcps1.3.3.8.2.5.1.1 "><p id="cce_02_0356__p13757103512202">enable</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="12.438756124387561%" headers="mcps1.3.3.8.2.5.1.2 "><p id="cce_02_0356__p1296323118192">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23.807619238076192%" headers="mcps1.3.3.8.2.5.1.3 "><p id="cce_02_0356__p19773103519202">Boolean</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="44.86551344865513%" headers="mcps1.3.3.8.2.5.1.4 "><p id="cce_02_0356__p078171181318">Whether to enable auto scaling.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="cce_02_0356__row33071322119"><td class="cellrowborder" valign="top" width="18.888111188881112%" headers="mcps1.3.3.8.2.5.1.1 "><p id="cce_02_0356__p143071138211">minNodeCount</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="12.438756124387561%" headers="mcps1.3.3.8.2.5.1.2 "><p id="cce_02_0356__p0853154813122">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23.807619238076192%" headers="mcps1.3.3.8.2.5.1.3 "><p id="cce_02_0356__p730723142112">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="44.86551344865513%" headers="mcps1.3.3.8.2.5.1.4 "><p id="cce_02_0356__p11781612131">Minimum number of nodes after a scale-down if auto scaling is enabled.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="cce_02_0356__row264916692110"><td class="cellrowborder" valign="top" width="18.888111188881112%" headers="mcps1.3.3.8.2.5.1.1 "><p id="cce_02_0356__p564956102116">maxNodeCount</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="12.438756124387561%" headers="mcps1.3.3.8.2.5.1.2 "><p id="cce_02_0356__p7852648171218">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23.807619238076192%" headers="mcps1.3.3.8.2.5.1.3 "><p id="cce_02_0356__p1964956122118">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="44.86551344865513%" headers="mcps1.3.3.8.2.5.1.4 "><p id="cce_02_0356__p16780191191320">Maximum number of nodes after a scale-up if auto scaling is enabled. The value of this parameter must be greater than or equal to that of <strong id="cce_02_0356__b185811357101317">minNodeCount</strong> and does not exceed the maximum number of nodes for the cluster.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="cce_02_0356__row170860392"><td class="cellrowborder" valign="top" width="18.888111188881112%" headers="mcps1.3.3.8.2.5.1.1 "><p id="cce_02_0356__p8706123825519">scaleDownCooldownTime</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="12.438756124387561%" headers="mcps1.3.3.8.2.5.1.2 "><p id="cce_02_0356__p11851154811124">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23.807619238076192%" headers="mcps1.3.3.8.2.5.1.3 "><p id="cce_02_0356__p87011643913">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="44.86551344865513%" headers="mcps1.3.3.8.2.5.1.4 "><p id="cce_02_0356__p577971111318">Interval during which nodes added after a scale-up will not be deleted, in minutes.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="cce_02_0356__row20753209193912"><td class="cellrowborder" valign="top" width="18.888111188881112%" headers="mcps1.3.3.8.2.5.1.1 "><p id="cce_02_0356__p1138185216552">priority</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="12.438756124387561%" headers="mcps1.3.3.8.2.5.1.2 "><p id="cce_02_0356__p19850348151217">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23.807619238076192%" headers="mcps1.3.3.8.2.5.1.3 "><p id="cce_02_0356__p575315915398">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="44.86551344865513%" headers="mcps1.3.3.8.2.5.1.4 "><p id="cce_02_0356__p57777114137">Node pool weight. A higher weight indicates a higher priority in scale-up.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="cce_02_0356__table6639183818241" frame="border" border="1" rules="all"><caption><b>Table 7 </b>Data structure of the <strong id="cce_02_0356__b086104184112">nodeTemplate</strong> field</caption><thead align="left"><tr id="cce_02_0356__row20639103819249"><th align="left" class="cellrowborder" valign="top" width="18.47815218478152%" id="mcps1.3.3.9.2.5.1.1"><p id="cce_02_0356__p37365711577">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="12.818718128187182%" id="mcps1.3.3.9.2.5.1.2"><p id="cce_02_0356__p1873518795711">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="23.837616238376164%" id="mcps1.3.3.9.2.5.1.3"><p id="cce_02_0356__p97342725717">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="44.86551344865513%" id="mcps1.3.3.9.2.5.1.4"><p id="cce_02_0356__p197331795711">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="cce_02_0356__row10932152613432"><td class="cellrowborder" valign="top" width="18.47815218478152%" headers="mcps1.3.3.9.2.5.1.1 "><p id="cce_02_0356__p1893232664313">k8sTags</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="12.818718128187182%" headers="mcps1.3.3.9.2.5.1.2 "><p id="cce_02_0356__p687685520467">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23.837616238376164%" headers="mcps1.3.3.9.2.5.1.3 "><p id="cce_02_0356__p3932102613432">Object</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="44.86551344865513%" headers="mcps1.3.3.9.2.5.1.4 "><p id="cce_02_0356__p5876455194611">Kubernetes label, in the format of key-value pair. A maximum of 20 key-value pairs are allowed.</p>
|
|
<ul id="cce_02_0356__ul102539423175"><li id="cce_02_0356__li18253184211714"><strong id="cce_02_0356__b13194738429">Key</strong>: Enter 1 to 63 characters starting with a letter or digit. Only letters, digits, hyphens (-), underscores (_), and periods (.) are allowed. A DNS subdomain can be prefixed to a key and contain a maximum of 253 characters. Example DNS subdomain: example.com/my-key.</li><li id="cce_02_0356__li444712449171"><strong id="cce_02_0356__b165341214174212">Value</strong>: The value can be left blank or a string of 1 to 63 characters starting with a letter or digit. Only letters, digits, hyphens (-), underscores (_), and periods (.) are allowed in the character string.</li></ul>
|
|
<p id="cce_02_0356__p1644615065413">Example:</p>
|
|
<pre class="screen" id="cce_02_0356__screen851218415616">"k8sTags": {
|
|
"key": "value"
|
|
}</pre>
|
|
</td>
|
|
</tr>
|
|
<tr id="cce_02_0356__row680512296436"><td class="cellrowborder" valign="top" width="18.47815218478152%" headers="mcps1.3.3.9.2.5.1.1 "><p id="cce_02_0356__p10805132914318">taints</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="12.818718128187182%" headers="mcps1.3.3.9.2.5.1.2 "><p id="cce_02_0356__p16339544472">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23.837616238376164%" headers="mcps1.3.3.9.2.5.1.3 "><p id="cce_02_0356__p4805162919438">Object</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="44.86551344865513%" headers="mcps1.3.3.9.2.5.1.4 "><div class="p" id="cce_02_0356__p62291832164216">Taints added to the created node to set anti-affinity. The following three parameters are contained in every taint:<ul id="cce_02_0356__ul17274222121015"><li id="cce_02_0356__li227482216106"><strong id="cce_02_0356__b6682164511421">Key</strong>: Enter 1 to 63 characters starting with a letter or digit. Only letters, digits, hyphens (-), underscores (_), and periods (.) are allowed. A DNS subdomain can be prefixed to a key.</li><li id="cce_02_0356__li7274112241020"><strong id="cce_02_0356__b18151133184317">Value</strong>: The value can be a string of 1 to 63 characters starting with a letter or digit. Letters, digits, hyphens (-), underscores (_), and periods (.) are allowed.</li><li id="cce_02_0356__li1655171215812"><strong id="cce_02_0356__b499072144314">Effect</strong>: Set it to <strong id="cce_02_0356__b39903212438">NoSchedule</strong>, <strong id="cce_02_0356__b1799072184315">PreferNoSchedule</strong>, or <strong id="cce_02_0356__b49901321164316">NoExecute</strong>.</li></ul>
|
|
</div>
|
|
<p id="cce_02_0356__p98321812817">Example:</p>
|
|
<pre class="screen" id="cce_02_0356__screen19127268812">"taints": [
|
|
{
|
|
"key": "status",
|
|
"value": "unavailable",
|
|
"effect": "NoSchedule"
|
|
},
|
|
{
|
|
"key": "looks",
|
|
"value": "bad",
|
|
"effect": "NoSchedule"
|
|
}]</pre>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p id="cce_02_0356__p1949713104354"><strong id="cce_02_0356__b18637103252113">Example request</strong>:</p>
|
|
<pre class="screen" id="cce_02_0356__screen235111314158">{
|
|
"metadata" : {
|
|
"name" : "nodepool-name-change"
|
|
},
|
|
"spec" : {
|
|
"nodeTemplate" : {
|
|
"k8sTags" : {
|
|
"cce.cloud.com/cce-nodepool": "nodepool-name-change",
|
|
"change-tag": "value2"
|
|
},
|
|
"taints" : [ {
|
|
"key" : "status",
|
|
"value" : "unavailable",
|
|
"effect" : "NoSchedule"
|
|
} ],
|
|
},
|
|
"autoscaling" : {
|
|
"enable" : true,
|
|
"minNodeCount" : 2,
|
|
"maxNodeCount" : 4,
|
|
"scaleDownCooldownTime" : 10,
|
|
"priority" : 2
|
|
},
|
|
"initialNodeCount" : 1
|
|
}
|
|
}</pre>
|
|
</div>
|
|
<div class="section" id="cce_02_0356__section61819725020"><h4 class="sectiontitle">Response</h4><p id="cce_02_0356__zh-cn_topic_0079614900_p2018733"><strong id="cce_02_0356__en-us_topic_0079614900_b18168603">Response parameters</strong>:</p>
|
|
<p id="cce_02_0356__p16966318249"><a href="cce_02_0354.html#cce_02_0354__table835415466262">Table 26</a> describes the response parameters.</p>
|
|
<p id="cce_02_0356__p1055311619571"><strong id="cce_02_0356__b580255393014">Response example</strong>:</p>
|
|
<pre class="screen" id="cce_02_0356__screen1778973121718">{
|
|
"kind": "NodePool",
|
|
"apiVersion": "v3",
|
|
"metadata": {
|
|
"name": "nodepool-name-change",
|
|
"uid": "feec6013-cd7e-11ea-8c7a-0255ac100be7"
|
|
},
|
|
"spec": {
|
|
"initialNodeCount": 0,
|
|
"type": "vm",
|
|
"nodeTemplate": {
|
|
"flavor": "s6.large.2",
|
|
"az": "eu-de-01",
|
|
"os": "EulerOS 2.5",
|
|
"login": {
|
|
"sshKey": "KeyPair-nodepool",
|
|
"userPassword": {}
|
|
},
|
|
"rootVolume": {
|
|
"volumetype": "SATA",
|
|
"size": 40
|
|
},
|
|
"dataVolumes": [
|
|
{
|
|
"volumetype": "SATA",
|
|
"size": 100,
|
|
"extendParam": {
|
|
"useType": "docker"
|
|
}
|
|
}
|
|
],
|
|
<span id="cce_02_0356__ph9565348181313"> "storage": {</span>
|
|
<span id="cce_02_0356__ph2056511483132"> "storageSelectors": [</span>
|
|
<span id="cce_02_0356__ph75653488131"> {</span>
|
|
<span id="cce_02_0356__ph15651248131319"> "name": "cceUse",</span>
|
|
<span id="cce_02_0356__ph2565124811136"> "storageType": "evs",</span>
|
|
<span id="cce_02_0356__ph1756594851310"> "matchLabels": {</span>
|
|
<span id="cce_02_0356__ph8565104817131"> "size": "100",</span>
|
|
<span id="cce_02_0356__ph25651348141318"> "volumeType": "SAS",</span>
|
|
<span id="cce_02_0356__ph356574819133"> "count": "1"</span>
|
|
<span id="cce_02_0356__ph14565048111315"> }</span>
|
|
<span id="cce_02_0356__ph10565154861317"> }</span>
|
|
<span id="cce_02_0356__ph12565154891315"> ],</span>
|
|
<span id="cce_02_0356__ph1956564818132"> "storageGroups": [</span>
|
|
<span id="cce_02_0356__ph1565164861310"> {</span>
|
|
<span id="cce_02_0356__ph1356514861311"> "name": "vgpaas",</span>
|
|
<span id="cce_02_0356__ph7565174813131"> "selectorNames": [</span>
|
|
<span id="cce_02_0356__ph12565114861319"> "cceUse"</span>
|
|
<span id="cce_02_0356__ph6565104815132"> ],</span>
|
|
<span id="cce_02_0356__ph256514484137"> "cceManaged": true,</span>
|
|
<span id="cce_02_0356__ph1856517481137"> "virtualSpaces": [</span>
|
|
<span id="cce_02_0356__ph185658487138"> {</span>
|
|
<span id="cce_02_0356__ph25651648141314"> "name": "runtime",</span>
|
|
<span id="cce_02_0356__ph8565134811134"> "size": "90%"</span>
|
|
<span id="cce_02_0356__ph7565194831312"> },</span>
|
|
<span id="cce_02_0356__ph1565648121312"> {</span>
|
|
<span id="cce_02_0356__ph456524891315"> "name": "kubernetes",</span>
|
|
<span id="cce_02_0356__ph5565154841310"> "size": "10%"</span>
|
|
<span id="cce_02_0356__ph756544821312"> }</span>
|
|
<span id="cce_02_0356__ph1856534817135"> ]</span>
|
|
<span id="cce_02_0356__ph2056584812137"> }</span>
|
|
<span id="cce_02_0356__ph4565174818135"> ]</span>
|
|
<span id="cce_02_0356__ph135654484139"> },</span>
|
|
"runtime": {
|
|
"name":"docker"
|
|
},
|
|
"publicIP": {
|
|
"eip": {
|
|
"bandwidth": {}
|
|
}
|
|
},
|
|
"nodeNicSpec": {
|
|
"primaryNic": {
|
|
"subnetId": "31be174a-0c7f-4b71-bb0d-d325fecb90ef"
|
|
}
|
|
},
|
|
"billingMode": 0,
|
|
"taints": [
|
|
{
|
|
"key": "change-taints",
|
|
"value": "value1",
|
|
"effect": "NoExecute"
|
|
}
|
|
],
|
|
"k8sTags": {
|
|
"cce.cloud.com/cce-nodepool": "nodepool-name-change",
|
|
"change-tag": "value2"
|
|
},
|
|
"userTags": [
|
|
{
|
|
"key": "change-resource-tag",
|
|
"value": "value3"
|
|
}
|
|
],
|
|
"extendParam": {
|
|
"DockerLVMConfigOverride": "dockerThinpool=vgpaas/90%VG;kubernetesLV=vgpaas/10%VG;diskType=evs;lvType=linear",
|
|
"alpha.cce/postInstall": "bHMgLWwK",
|
|
"alpha.cce/preInstall": "bHMgLWw=",
|
|
"maxPods": 110
|
|
}
|
|
},
|
|
"autoscaling": {
|
|
"enable": true,
|
|
"minNodeCount": 2,
|
|
"maxNodeCount": 4,
|
|
"scaleDownCooldownTime": 10,
|
|
"priority": 2
|
|
},
|
|
"nodeManagement": {
|
|
"serverGroupReference": "2129f95a-f233-4cd8-a1b2-9c0acdf918d3"
|
|
}
|
|
},
|
|
"status": {
|
|
"currentNode": 0,
|
|
"phase": ""
|
|
}
|
|
}</pre>
|
|
</div>
|
|
<div class="section" id="cce_02_0356__s50f1049a6a4d404c895cf636eb8f3bf1"><h4 class="sectiontitle">Status Code</h4><p id="cce_02_0356__zh-cn_topic_0079614900_p21869221"><a href="#cce_02_0356__zh-cn_topic_0079614900_table46761928">Table 8</a> describes the status code of this API.</p>
|
|
|
|
<div class="tablenoborder"><a name="cce_02_0356__zh-cn_topic_0079614900_table46761928"></a><a name="zh-cn_topic_0079614900_table46761928"></a><table cellpadding="4" cellspacing="0" summary="" id="cce_02_0356__zh-cn_topic_0079614900_table46761928" frame="border" border="1" rules="all"><caption><b>Table 8 </b>Status code</caption><thead align="left"><tr id="cce_02_0356__zh-cn_topic_0079614900_row33254664"><th align="left" class="cellrowborder" valign="top" width="38.93%" id="mcps1.3.5.3.2.3.1.1"><p id="cce_02_0356__p55616028205955">Status Code</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="61.07%" id="mcps1.3.5.3.2.3.1.2"><p id="cce_02_0356__p8604418205955">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="cce_02_0356__zh-cn_topic_0079614900_row41084259"><td class="cellrowborder" valign="top" width="38.93%" headers="mcps1.3.5.3.2.3.1.1 "><p id="cce_02_0356__zh-cn_topic_0079614900_p39490674">200</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="61.07%" headers="mcps1.3.5.3.2.3.1.2 "><p id="cce_02_0356__zh-cn_topic_0079614900_p44628050">The specified node pool is updated successfully.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p id="cce_02_0356__p347213715512">For details about error status codes, see <a href="cce_02_0084.html">Status Code</a>.</p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="cce_02_0092.html">Cluster Management</a></div>
|
|
</div>
|
|
</div>
|
|
|