Updating the cluster to a new Kubernetes version

Step 1: Adding a new ClusterStack

Add a new ClusterStack and HetznerClusterStackReleaseTemplate for the newer Kubernetes minor version:

Apply it to the cluster with your tool of choice and the node images for the new version will start to build.

tip

The build process takes around 5 minutes. If you are curious or think something went wrong, you can take a look at the status of the newly created ClusterStack object.

Step 2: Checking the available ClusterStackReleases

The next step is to is to check the available ClusterStackReleases :

Note down the values of the NAME and K8S VERSION columns from the release you want to upgrade to.

Now we edit our cluster and change the spec.topology.class and spec.topology.version to match the NAME and K8S VERSION of our cluster stack release:

cluster.yaml yaml
apiVersion: cluster.x-k8s.io/v1beta1 kind: Cluster metadata: name: mycluster spec: topology: class: hetzner-apalla-1-28-v11 // [!code focus:2] version: 1.28 controlPlane: replicas: 3 workers: machineDeployments: - class: workeramd64hcloud name: md-0 replicas: 1 failureDomain: nbg1 variables: overrides: - name: workerMachineTypeHcloud value: cpx31 variables: - name: region value: nbg1 - name: controlPlaneMachineTypeHcloud value: cpx31

This can be achieved either by editing the resource inside the management cluster, or by updating it in your GitOps repository.

Now your cluster will be updated (with no downtime!) to the new Kubernetes minor version.

If you are no longer using the old ClusterStack and HetznerClusterStackReleaseTemplate anymore, you can remove them now.

Next
Introduction to Syself Autopilot