Kubernetes upgrade notes: 1.33.x to 1.34.x

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!

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.

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.

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:

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.

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.

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 😉

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! 😉

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:

Besides that:

  • kubelet: removed the deprecated flag --cloud-config from 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 NodeInfos to the PreFilter plugins. The PreFilter plugins now accepted the NodeInfo list from the arguments.

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.

  • DRA kubelet: gRPC API graduated to v1, v1beta1 was deprecated starting in 1.34. Updating DRA drivers to the k8s.io/dynamic-resource-allocation/kubeletplugin helper from 1.34 added support for both API versions.
  • Deprecated the preferences field in kubeconfig in favor of kuberc
  • Added a new FileKeyRef field 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 kubelet for monitoring the health of devices allocated via Dynamic Resource Allocation (DRA) and report it in the pod.status.containerStatuses.allocatedResourcesStatus field. This required the DRA plugin to implement the new v1alpha1 NodeHealth gRPC service.
  • Allowed setting the hostnameOverride field in PodSpec to specify any RFC 1123 DNS subdomain as the pod’s hostname. The HostnameOverride feature gate was introduced to control enablement of this functionality.
  • kube-apiserver: Added support for disabling caching of authorization webhook decisions in the --authorization-config file. The new fields cacheAuthorizedRequests and cacheUnauthorizedRequests could be set to false to prevent caching for authorized or unauthorized requests.
  • kube-apiserver: the AuthenticationConfiguration type accepted in --authentication-config files has been promoted to apiserver.config.k8s.io/v1.
  • kubectl: Graduated kuberc support to beta. A kuberc configuration file provided a mechanism for customizing kubectl behavior.
  • Promoted Job Pod Replacement Policy to general availability.
  • Added HPA support to pod-level resource specifications. When the pod-level resource feature was enabled, HPAs configured with Resource type metrics calculated the pod resources from pod.Spec.Resources field, if specified.
  • Added Traffic Distribution field to kubectl describe service output.
  • Added a --show-swap option to kubectl top subcommands.
  • Added configurable flags to kube-apiserver for coordinated leader election.
  • Added support for --cpu, --memory flag to kubectl autoscale, started deprecating --cpu-percent.
  • Added support for a new kubectl output 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.
  • etcd: Updated to v3.5.26
  • Upgraded CoreDNS to v1.12.1

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.

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! 😉