このトピックでは、クラスターのノード数を増やす方法を説明します。 API の説明については、「Kubernetes クラスターのスケールアウト」をご参照ください。
API リクエストと応答
リクエスト形式
aliyun cs PUT /clusters/<cluster_id> --header "Content-Type=application/json" --body "$(cat scale.json)"
パラメーターの説明:
--header
: コンテンツタイプ を application/json で指定します。--body
: これはサーバーに送信されたコンテンツ本文です。 コンテンツはローカルファイルから読み込み可能です。JSON 形式にする必要があります。scale.json
のコンテンツは次の通りです。
Kubernetes クラスター
{ "disable_rollback": "indicates whether to roll back the cluster if cluster expansion fails",
"timeout_mins": "timeout period for creating a cluster",
"worker_instance_type": "Worker instance type",
"login_password": "password used to log on to the node by using SSH",
"num_of_nodes": "number of Worker nodes"
}
応答結果
{
"cluster_id": "c61cf530524474386a7ab5a1c192a0d57",
"request_id": "348D4C9C-9105-4A1B-A86E-B58F0F875575",
"task_id": "T-5ad724ab94a2b109e8000004"
}