Skip to main content

Upgrade Kubernetes Cluster

POST/v1/clusters/{cluster_ident}/actions/upgrade

Upgrades 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

Request​

Parameters​

cluster_identstringrequiredpath

The UUID or name of the cluster.

cluster_templatestringrequiredbody

UUID of the cluster template that defines the target version.

max_batch_sizeintegerbody

Maximum number of nodes upgraded at the same time. Default: 1.

nodegroupstringbody

ID 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 CodeDescription
202 - AcceptedThe upgrade was accepted and is being processed.

Error​

Status CodeDescription
401 - UnauthorizedUser must authenticate before making a request.
403 - ForbiddenPolicy does not allow current user to do this operation.
404 - Not FoundThe cluster or the template does not exist.
409 - ConflictThe 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.