kube-upgrade-controller
Github: https://github.com/heathcliff26/kube-upgrade
6.4K
Kubernetes controller and daemon for managing cluster updates.
To install kube-upgrade, follow these steps:
kubectl apply -f https://raw.githubusercontent.com/heathcliff26/kube-upgrade/main/examples/upgrade-controller.yaml
https://raw.githubusercontent.com/heathcliff26/kube-upgrade/main/examples/upgrade-cr.yaml
| Container Registry | Image |
|---|---|
| Github Container | ghcr.io/heathcliff26/kube-upgrade-controller |
| Docker Hub | docker.io/heathcliff26/kube-upgrade-controller |
| Quay.io | quay.io/heathcliff26/kube-upgrade-controller |
There are different flavors of the image:
| Tag(s) | Description |
|---|---|
| latest | Last released version of the image |
| rolling | Rolling update of the image, always build from main branch. |
| vX.Y.Z | Released version of the image |
Kube-upgrade consists of 2 components, the upgrade-controller and upgraded. They work together to ensure automatic kubernetes updates across your cluster. It does depend on a fleetlock server to ensure nodes are not updated simoultaneously, as well as for draining nodes beforehand.
Important Notice: When creating a plan, it is always necessary to ensure that the control-plane nodes are upgraded first.
The controller runs in the cluster coordinates the upgrades across the cluster by reading the KubeUpgradePlan and annotating nodes with the correct settings.
It will do this per group, depending on how the order is defined in the plan.
The upgraded daemon runs on each node and upgrades the node in accordance with the annotations provided by upgrade-controller.
Even without kubernetes version upgrades, it will constantly check for new Fedora CoreOS versions in the same stream and update to them.
When it detects an update for kubernetes, it will execute the following:
kubeadm upgrade node or kubeadm upgrade apply <version>, depending on if it is the first node.So far as i tested, upgrading between patches (e.g. 1.30.3 -> 1.30.4) is going fine. However when upgrading between 1.30 and 1.31, the static pods for kubernetes do not start with a version mismatch (1.30 pod, 1.31 kubelet). This causes the preflight checks to fail. The solution in this case was for me to ignore preflight errors anyway and simply upgrade to 1.31. This fixed the problem.
I think the reason is, that while it is not explicitly stated in the docs (See Links) and kind of hinted it could be done the other way around, the expected way for the upgrade is the following:
kubeadm upgrade (node|apply)What upgraded is doing instead is, it upgrades both kubeadm and kubelet at the same time (by rebasing). So in conclusion:
TLDR; Upgrading between patches (e,g, 1.x.y -> 1.x.z) is fine, upgrading between minor versions (e.g. 1.x -> 1.y) should be done with proper planning, lots of tests, caution and quite possible manually.
Content type
Image
Digest
sha256:70230a303…
Size
536 Bytes
Last updated
9 days ago
docker pull heathcliff26/kube-upgrade-controller:sha256-2d8637c17e2e640b91e13c4d62e3426dc1ede3863783f0c12028f6a3cb83abf2.sig