A guide explaining how to update your Vultr Kubernetes Engine (VKE) cluster to a newer version
Upgrading a Vultr Kubernetes Engine (VKE) cluster version involves updating both the control plane and worker nodes to a newer Kubernetes version. This ensures that your cluster benefits from the latest features, improvements, and security patches. Vultr Kubernetes Engine simplifies the upgrade process, allowing you to maintain your VKE cluster’s efficiency and compatibility with new Kubernetes releases.
Follow this guide to upgrade your Vultr Kubernetes Engine cluster version on your Vultr account using the Vultr Customer Portal, API, CLI, or Terraform.
Send a GET
request to the List all Kubernetes Clusters endpoint and note the target VKE cluster's ID.
$ curl "https://api.vultr.com/v2/kubernetes/clusters" \
-X GET \
-H "Authorization: Bearer ${VULTR_API_KEY}"
Send a GET
request to the Get Kubernetes Available Upgrades endpoint to list available upgrades for your VKE cluster.
$ curl "https://api.vultr.com/v2/kubernetes/clusters/{cluster-id}/available-upgrades" \
-X GET \
-H "Authorization: Bearer ${VULTR_API_KEY}"
Send a POST
request to the Start Kubernetes Cluster Upgrade endpoint to start the VKE cluster upgrade.
$ curl "https://api.vultr.com/v2/kubernetes/clusters/{cluster-id}/upgrades" \
-X POST \
-H "Authorization: Bearer ${VULTR_API_KEY}" \
-H "Content-Type: application/json" \
--data '{
"upgrade_version" : "{target-kubernetes-version}"
}'
List the available VKE clusters in your Vultr account and note the target VKE cluster's ID.
$ vultr-cli kubernetes list --summarize
List all the available upgrades for the target VKE cluster.
$ vultr-cli kubernetes upgrades list <cluster-id>
Start the upgrade process for the target VKE cluster.
$ vultr-cli kubernetes upgrades start <cluster-id> --version "<target-kubernetes-version>"
Open your Terraform configuration for the existing VKE cluster.
Set the cluster version
to the desired target and apply. Worker nodes will be recreated.
resource "vultr_kubernetes" "vke" {
# ...existing fields (label, region, node_pools)
version = "1.29.3+1" # target version
}
Apply the configuration and observe the following output:
Apply complete! Resources: 0 added, 1 changed, 0 destroyed.
No comments yet.