Upgrading the Kubernetes Cluster API Provider Hetzner

This guide explains how to upgrade Cluster API and Cluster API Provider Hetzner (aka CAPH). Additionally, it also references upgrading your kubernetes version as part of this guide.

Set matching kubeconfig

Connect kubectl to the management cluster.

Check, that you are connected to the correct cluster:

console

OK, looks good.

Update clusterctl

Is clusterctl still up to date?

console

You can see the current version here:

https://cluster-api.sigs.k8s.io/user/quick-start.html#install-clusterctl

If your clusterctl is outdated, then upgrade it. See the above URL for details.

clusterctl upgrade plan

Have a look at what could get upgraded:

console

Docs: clusterctl upgrade plan

You might be surprised that for infrastructure-hetzner , you see the "Already up to date" message below "NEXT VERSION".

note

clusterctl upgrade plan does not display pre-release versions by default.

Upgrade cluster-API

We will upgrade cluster API core components to the v1.12.7 version. Use the command, which you saw in the plan:

console

Great, cluster-API was upgraded.

note

If you want to update only one components or update components one by one then there are flags for that under clusterctl upgrade apply subcommand like --bootstrap , --control-plane and --core .

Upgrade CAPH

You can find the latest version of CAPH here:

https://github.com/syself/cluster-api-provider-hetzner/tags

console

After the upgrade, you'll notice the new pod spinning up the caph-system namespace.

console
note

Please note that clusterctl doesn't support pre-release of GitHub by default so if you want to use a pre-release, you'll have to specify the version such as hetzner:v1.0.7

Check your cluster

Check the health of your workload cluster with your preferred tools and ensure that all components are healthy especially apiserver and etcd pods.

External Cluster API Reference

After upgrading cluster API, you may want to update the Kubernetes version of your controlplane and worker nodes. Those details can be found in the Cluster API documentation.

note

The update can be done on either management cluster or workload cluster separately as well.

You should upgrade your kubernetes version after considering that a Cluster API minor release supports (when it’s initially created):

  • 4 Kubernetes minor releases for the management cluster (N - N-3)
  • 6 Kubernetes minor releases for the workload cluster (N - N-5)
Previous
Node Images