How to Upgrade to a new YAOOK/K8s release
In this tutorial, we will guide you step-by-step through the process of upgrading to a new YAOOK/K8s release.
Carefully read the whole document before taking any actions. Also verify that you are looking at the documentation of the target release version. All currently available releases can be found on the Gitlab releases page.
Important
Ensure your cluster is running a Kubernetes version which is still supported by the target release. If your cluster is running on an older Kubernetes version, you must do a Kubernetes upgrade first.
Starting out we assume you have got an up to date and usable cluster repo in front of you plus solid understanding of git submodules.
All steps are to performed from the cluster repo’s root.
Choosing the target YAOOK/K8s release
It is recommended to consult the Releasenotes in any case. Details about the used scheme can be found at Release and Versioning Policy.
You can use the following to figure out the currently used release:
$ git submodule status managed-k8s
$ cat managed-k8s/version
Patch Versions
Skipping patch versions is generally safe because they typically contain backward-compatible fixes and improvements. This means, it is feasible to jump to any available next patch release.
Minor Versions
Skipping minor versions is usually supported, but it’s highly recommended to carefully review the release notes. This means, it is feasible to jump to any available next minor release.
Major Versions
Skipping major versions is not supported as these introduce breaking changes which may require manual intervention or adjustments. This means, it is only feasible to move to the next available major release. You can directly jump to any available minor version of the next major release though.
Important
You must read the Releasenotes if you want to upgrade to a new major release.
Performing the YAOOK/K8s Upgrade
If enabled, establish the WireGuard connection:
$ ./managed-k8s/actions/wg-up.sh
Ensure you have a valid kubeconfig and access to the Kubernetes API:
$ ./managed-k8s/actions/k8s-login.sh $ kubectl get nodes
Move to the target release branch
Update the YAOOK/K8s submodule to the next major version:
$ # Assuming release/v7.0 is currently in use $ # and you want to update to release/v8.0 $ git submodule set-branch --branch release/v8.0 managed-k8s $ git submodule update --remote managed-k8s
Update the YAOOK/K8s submodule to a specific minor version:
$ # Assuming release/v8.0 is currently in use $ # and you want to update to release/v8.1 $ git submodule set-branch --branch release/v8.1 managed-k8s $ git submodule update --remote managed-k8s
Update the YAOOK/K8s submodule to the latest available patch version:
$ git submodule update --remote managed-k8s
Additional intermediate steps
Follow every instruction mentioned in the Releasenotes. In most cases, necessary steps to move to the next major release are automated:
$ ./managed-k8s/actions/migrate-cluster-repo.sh
No additional intermediate steps needed.
Trigger a complete rollout:
$ ./managed-k8s/actions/apply-all.sh
Verify the upgrade. Confirm that the Kubernetes cluster is functioning as expected after the upgrade by triggering the tests and checking the nodes and Pods.
$ ./managed-k8s/actions/test.sh $ kubectl get nodes -o wide $ kubectl get pods -A | grep -Ev "Running|Completed"