Kubernetes upgrade notes: 1.33.x to 1.34.x

Introduction
If you used my Kubernetes the Not So Hard Way With Ansible blog posts to setup a Kubernetes (K8s) cluster this notes might be helpful for you (and maybe for others too that manage a K8s cluster on their own e.g.). I’ll only mention changes that might be relevant because they will either be interesting for most K8s administrators anyways (even in case they run a fully managed Kubernetes deployment) or if it’s relevant if you manage your own bare-metal/VM based on-prem Kubernetes deployment. I normally skip changes that are only relevant for GKE, AWS EKS, Azure or other cloud providers.
I’ve a general upgrade guide Kubernetes the Not So Hard Way With Ansible - Upgrading Kubernetes that worked quite well for me for the last past K8s upgrades. So please read that guide if you want to know HOW the components are updated. This post here is esp. for the 1.33.x to 1.34.x upgrade and WHAT was interesting for me.
As usual I don’t update a production system before the .2 release of a new major version is released. In my experience the .0 and .1 are just too buggy (well, it got way better meanwhile but you don’t want do experiments in production, right? 😉). Nevertheless it’s important to test new releases (and even beta or release candidates if possible) already in development environments and report bugs!
Update to latest current release
I try to only upgrade from the latest version of the former major release. At the time writing this blog post 1.33.13 was the latest 1.33.x release. After reading the 1.33 CHANGELOG to figure out if any important changes where made between the current 1.33.x and latest 1.32.13 release I didn’t see anything that prevented me updating and I don’t needed to change anything.
So I did the 1.33.13 update first. If you use my Ansible roles that basically only means to change k8s_ctl_release variable from 1.33.x to 1.33.13 (for the controller nodes) and the same for k8s_worker_release (for the worker nodes). Deploy the changes for the control plane and worker nodes as described in my upgrade guide.
Hint: To save some time, IMHO it should be good enough to only update the controller nodes to the latest 1.33.x release as it’s mostly the kube-apiserver that stores the state of the Kubernetes cluster in etcd and that state is quite important. That’s what I normally do. Upgrading to the next major release can then be done for all nodes as usual. But if you want to be absolutely sure just upgrade the whole cluster to the latest 1.33.x release first.
After that everything still worked as expected, I continued with the next step.
Upgrading kubectl
As it’s normally no problem (and actually the supported method) to have a newer kubectl utility that is only one major version ahead of the server version I updated kubectl from 1.33.x to latest 1.34.x using my kubectl Ansible role.
Upgrading etcd
While my roles are not using kubeadm to manage my K8s cluster, it’s recommended to have at least etcd 3.5.24 running (but version 3.5.26 makes even more sense - see below). I updated my etcd role to current 3.5.24 and updated my etcd deployment accordingly. See Upgrading Kubernetes - etcd for more information how to upgrade etcd. Also Kubernetes v1.31: Accelerating Cluster Performance with Consistent Reads from Cache.
Note: There is already etcd 3.6.x available. But for K8s 1.34 I’ll stay with etcd 3.5 for now. etcd 3.6.x has some breaking changes that needs to be addressed first.
NOTE: If you use etcd for Kubernetes and want to upgrade to etcd v3.6 you DEFINITELY want to upgrade to etcd v3.5.26 first! For further information:
Upgrading containerd
containerd was updated from 2.1.3 to 2.3.0 which is a LTS release with longer support. I updated my containerd role accordingly. Please read the CHANGELOG for potential breaking changes. From my experience the upgrade “just works”.
containerd >= 2.0 is also a prerequisite to use user namespace isolation which got enabled by default as of Kubernetes 1.33.
Upgrading runc
runc was upgraded from 1.3.2 to 1.4.0. I’ve updated my runc role accordingly. Release notes for runc are in runc releases but shouldn’t be that interesting.
With runc >= 1.2 and containerd >= 2.0 (as mentioned above) User Namespaces are finally supported. Together with Kubernetes release 1.33 user namespace isolation finally arrived out of the box and you should consider using it.
Upgrading CNI
And finally the CNI plugins are updated from 1.8.0 to 1.9.0. Again I updated my CNI role accordingly. The release notes for CNI 1.9.0 might be worth a read but only if you want to go deeper 😉
Release notes
There are also searchable release notes available for K8s version 1.34.0 to 1.34.12. You can specify the K8s version and a K8s area/component (e.g. kubelet, apiserver, …) and immediately get an overview what changed in that regard. Quite nice! 😉
Urgent Upgrade Notes
NOTE: If you use etcd for Kubernetes and want to upgrade to etcd v3.6 you DEFINITELY want to upgrade to etcd v3.5.26 first! For further information:
I guess most users wont be affected by any Urgent Upgrade Notes. Here are the potentially important ones:
- Action Required: Quite a few
apiserver_*metrics changes. Check the list in Urgent Upgrade Notes.
Besides that:
kubelet: removed the deprecated flag--cloud-configfrom the command line (shouldn’t be relevant for self-hosted cluster anyway)- Static pods that reference API objects were denied admission by the
kubelet - The Scheduling Framework exposed
NodeInfosto thePreFilterplugins. ThePreFilterplugins now accepted theNodeInfolist from the arguments.
What’s New (Major Themes)
All important stuff is listed in the Kubernetes v1.34: Of Wind & Will release announcement.
The following list of changes and features only contains stuff that I found useful and interesting. That means I’m normally not mentioning any Kubernetes internals that have changed but mostly stuff that is interesting for administrators and operation. This is mainly to remember myself what changed 😉 See the full Kubernetes v1.34 Changelog for all changes.
Deprecations
- DRA kubelet: gRPC API graduated to v1, v1beta1 was deprecated starting in 1.34. Updating DRA drivers to the
k8s.io/dynamic-resource-allocation/kubeletpluginhelper from 1.34 added support for both API versions. - Deprecated the
preferencesfield in kubeconfig in favor ofkuberc
API changes
- Added a new
FileKeyReffield to containers, allowing them to load variables from files by setting this field. Introduced the EnvFiles feature gate to govern activation of this functionality. - Added support in the
kubeletfor monitoring the health of devices allocated via Dynamic Resource Allocation (DRA) and report it in thepod.status.containerStatuses.allocatedResourcesStatus field. This required the DRA plugin to implement the new v1alpha1 NodeHealth gRPC service. - Allowed setting the
hostnameOverridefield inPodSpecto specify any RFC 1123 DNS subdomain as the pod’s hostname. TheHostnameOverridefeature gate was introduced to control enablement of this functionality. kube-apiserver: Added support for disabling caching of authorization webhook decisions in the--authorization-configfile. The new fieldscacheAuthorizedRequestsandcacheUnauthorizedRequestscould be set to false to prevent caching for authorized or unauthorized requests.kube-apiserver: theAuthenticationConfigurationtype accepted in--authentication-configfiles has been promoted toapiserver.config.k8s.io/v1.kubectl: Graduatedkubercsupport to beta. Akubercconfiguration file provided a mechanism for customizingkubectlbehavior.- Promoted Job Pod Replacement Policy to general availability.
Features
- Added HPA support to pod-level resource specifications. When the pod-level resource feature was enabled, HPAs configured with
Resourcetype metrics calculated the pod resources frompod.Spec.Resourcesfield, if specified. - Added Traffic Distribution field to
kubectl describe serviceoutput. - Added a
--show-swapoption tokubectl topsubcommands. - Added configurable flags to
kube-apiserverfor coordinated leader election. - Added support for
--cpu,--memoryflag tokubectl autoscale, started deprecating--cpu-percent. - Added support for a new
kubectloutput format,kyaml. KYAML was a strict subset of YAML and should be accepted by any YAML processor. The formatting of KYAML was halfway between JSON and YAML. Because it was more explicit than the default YAML style, it was less error-prone.
Further reading
- Kubernetes v1.34: Of Wind & Will (O’ WaW)
- Kubernetes v1.34: User preferences (kuberc) are available for testing in kubectl 1.34
- Kubernetes v1.34: Finer-Grained Control Over Container Restarts
- Kubernetes v1.34: DRA has graduated to GA
- Kubernetes v1.34: Introducing CPU Manager Static Policy Option for Uncore Cache Alignment
- Kubernetes v1.34: Service Account Token Integration for Image Pulls Graduates to Beta
- Kubernetes v1.34: PSI Metrics for Kubernetes Graduates to Beta
- Kubernetes v1.34: Pod Replacement Policy for Jobs Goes GA
- Kubernetes v1.34: VolumeAttributesClass for Volume Modification GA
- Kubernetes v1.34: Snapshottable API server cache
- Kubernetes v1.34: Use An Init Container To Define App Environment Variables
- Kubernetes v1.34: Mutable CSI Node Allocatable Graduates to Beta
- Kubernetes v1.34: Autoconfiguration for Node Cgroup Driver Goes GA
- Kubernetes v1.34: Decoupled Taint Manager Is Now Stable
- Kubernetes v1.34: Moving Volume Group Snapshots to v1beta2
- Kubernetes v1.34: Pods Report DRA Resource Health
- Kubernetes v1.34: DRA Consumable Capacity
- Kubernetes v1.34: Recovery From Volume Expansion Failure (GA)
- Kubernetes v1.34: Pod Level Resources Graduated to Beta
- Kubernetes v1.34 Sneak Peek
Other
etcd: Updated tov3.5.26- Upgraded CoreDNS to
v1.12.1
CSI
If you use CSI then also check the CSI Sidecar Containers documentation. Every sidecar container contains a matrix which version you need at a minimum, maximum and which version is recommend to use with whatever K8s version.
Nevertheless if your K8s update to v1.34 worked fine I would recommend to also update the CSI sidecar containers sooner or later.
Upgrade Kubernetes
Now I finally upgraded the K8s controller and worker nodes to version 1.34.x as described in Kubernetes the Not So Hard Way With Ansible - Upgrading Kubernetes.
That’s it for today! Happy upgrading! 😉