Upgrade Kubernetes Cluster
POST
/v1/clusters/{cluster_ident}/actions/upgradeUpgrades the cluster to the Kubernetes version defined in another cluster template. The template carries the target image, version, and node settings, so prepare it first, then pass its UUID.
info
Source: upgrade-a-cluster
Request
Parameters
cluster_identstringrequiredpathThe UUID or name of the cluster.
cluster_templatestringrequiredbodyUUID of the cluster template that defines the target version.
max_batch_sizeintegerbodyMaximum number of nodes upgraded at the same time. Default: 1.
nodegroupstringbodyID of the node group to upgrade.
Sample Request
curl -ks -X POST -H 'Content-Type: application/json' \
-H 'OpenStack-API-Version: container-infra 1.8' -H 'X-Auth-Token: gAAAAA<...>' \
-d '{
"cluster_template": "b5093d08-f9fd-4a7c-8f69-8cfeb3710e4e",
"max_batch_size": 1
}' https://api.vietnix.cloud:9513/v1/clusters/{cluster_ident}/actions/upgrade
Response
Sample Response
{
"uuid": "01d0583d-e8b3-483f-896f-08d2260b0dea"
}
Status Code
Success
| Status Code | Description |
|---|---|
| 202 - Accepted | The upgrade was accepted and is being processed. |
Error
| Status Code | Description |
|---|---|
| 401 - Unauthorized | User must authenticate before making a request. |
| 403 - Forbidden | Policy does not allow current user to do this operation. |
| 404 - Not Found | The cluster or the template does not exist. |
| 409 - Conflict | The cluster is in a status that does not allow upgrading. |
warning
An upgrade cannot be rolled back through the API. Take a backup of the workloads and of etcd before you start, and keep max_batch_size at 1 until you have verified the first node.
note
The target template must use an image and Kubernetes version that are newer than the current cluster. Downgrades are not supported.