Table of Contents | ||
---|---|---|
|
This is adapted from: https://cluster-api.sigs.k8s.io/tasks/upgrading-clusters.html
...
It’s recommended to regularly upgrade your clusters. This avoids trying to maintain tooling version compatibility against major Kubernetes versions.
OS Patches
The operating system and associated packages can be updated independently, e.g. to apply security patches to the host OS.
The Ubuntu image is stripped so the packages (and number of vulnerabilities) is significantly lower. The Cloud team will make it clear when a CVE applies to the CAPI Ubuntu images.
Skip to https://stfc.atlassian.net/wiki/spaces/CLOUDKB/pages/edit-v2/285704256#Without-minor-version-upgrade .
Note |
---|
Containers are controlled by Kubernetes. If a container (e.g. |
Multiple Version Upgrades
...
To upgrade major versions you will need to follow the https://stfc.atlassian.net/wiki/spaces/CLOUDKB/pages/285704256/Cluster+API+Upgrade#Upgrade-Clusterctl-and-CAPI-components section first then https://stfc.atlassian.net/wiki/spaces/CLOUDKB/pages/285704256/Cluster+API+Upgrade#UpgradingUpgrade#Kubernetes-KubernetesImage-Majorand-Version-Upgrades for each hop.
Overview
This process assumes the administrator is doing a full upgrade of all components. These can be upgraded independently with the caveat that the Infrastructure layer supports the version of Kubernetes planned: https://cluster-api.sigs.k8s.io/reference/versions
...
Validate that the upgrade is valid and apply the command provided by clusterctl
Kubernetes Image and Version Upgrades
This section assumes production clusters and upgrades components individually.
For development / low risk clusters both steps can be combined into a single roll-out.
Without minor version upgrade
...
You’ll need to upgrade VM images and Kubernetes version to the latest patch version available
...
before doing any major upgrades:
I.e. if you’re on 1.100.12 upgrade to the latest 1.100.x, this ensures any bug-fixes are applied which could prevent later upgrades.
For major and minor
...
upgrades
...
:
Lookup the latest image build for Kubernetes, this can be found in images section of the web interface
Edit the
kubernetesVersion
inuser-values.yaml
...
to
...
match the image name
Edit the
machineImage
inuser-values.yaml
...
to
...
use the latest patch release
Code Block |
---|
helm upgrade <cluster_name> capi/openstack-cluster -f values.yaml -f clouds.yaml -f user-values.yaml -f flavors.yaml -n clusters |
Wait for the rollout of new infra to complete
The rollout can be monitored with
kubectl get kcp -A
andkubectl get md -A
Machine details can be found in
kubectl get machines -A
andkubectl get openstackmachines -A
With minor version upgrade
Upgrade to the Repeat for each major upgrade step
You can only do a single major upgrade at a time, e.g.
1.100.12
to1.101.4
, then1.102.6
Troubleshooting
On the management cluster
...