maborak.com~/blog/kubernetes-1-38-beta-upgrade-checkssoftware & infrastructure engineering
Back to all articles

Kubernetes v1.38 beta: what it changes on a running node

Overview

We built a v1.38 beta node and tested the cgroup driver, Pod-level swap, webhook exclusions and kubectl changes against v1.37.

We built a v1.38.0-beta.0 node, set cgroupDriver: cgroupfs in its kubelet configuration while containerd reported systemd, and started a pod. The pod ran. The kubelet logged that it was using the driver the runtime reported, and the feature gate the release announcement (opens in a new tab) names for keeping the old behaviour does not exist in the build. The same manifest on v1.37 and v1.38 nodes left a different memory.swap.max on the Pod cgroup, max against 0, on a host with no swap at all.

Checked 24 November 2026.

The beta comes from the CI artifact

v1.38 is planned for 16 December 2026, and no kindest/node image exists for it yet, so we built one from the CI artifact with kind build node-image --type=ci ci/latest-1.38. That resolved to v1.38.0-beta.0.882+43cbb94ee845ad, the commit this post calls the beta. The control is a v1.37.0 node from the image our earlier labs use.

Component Version
Lab node, v1.38 v1.38.0-beta.0.882+43cbb94ee845ad, built from ci/latest-1.38
Control node, v1.37 v1.37.0, kind image digest a1ed56cfb0e7
kubectl clients v1.37.2 and v1.38.0-beta.0.882+43cbb94ee845ad
Host macOS 27.0.1 on arm64, Docker 29.5.2, kind v0.33.0

Terminal capture: kubectl reports k138-control-plane Ready at v1.38.0-beta.0.882+43cbb94ee845ad, the client and the server report the same beta version, the node runs containerd 2.3.4 on cgroup v2, and k137-control-plane is Ready at v1.37.0.

The two nodes this post tests, captured at 04:01 UTC on 24 November 2026. Both run the same containerd and the same kernel; only the Kubernetes version differs.

The preview (opens in a new tab) lists intentions and says the content may change before the release.

The cgroup driver field is inert, and nothing rejects it yet

The preview puts this first under breaking changes: v1.38 nodes “will essentially require that your container runtime is running before the kubelet starts”, the kubelet “will actually reject” a cgroupDriver field unless you enable LegacyCgroupDriverFallback, and kubeadm stops setting the field.

We wrote cgroupDriver: cgroupfs into /var/lib/kubelet/config.yaml on a throwaway node of each version, restarted the kubelet, and created a pod from registry.k8s.io/pause:3.10. Both kubelets stayed active, both logged that they were using the driver from the runtime, and both pods reached Running.

Terminal capture of the cgroup driver test on both nodes: the configuration file reads cgroupDriver: cgroupfs, the kubelet logs that it is using the setting received from the CRI runtime, systemd, and a probe pod runs on each node.

The same test on both nodes, captured at 03:55 UTC. The file says one thing, the runtime says another, and the kubelet follows the runtime.

Diagram of the kubelet on the left and containerd on the right. An arrow labelled RuntimeConfig RPC carries systemd from containerd to the kubelet, and another arrow carries the cgroup driver back. Below the kubelet, a dashed box holding cgroupDriver: cgroupfs is struck through, marked ignored since v1.34.

The file value stopped mattering before this release. KubeletCgroupDriverFromCRI graduated and was locked on in 1.34, so the runtime has been the source of truth since then.

The split it removes was expensive to debug. The kubelet builds the cgroup for the Pod and the runtime builds the cgroups for the containers, and the two cgroup hierarchies do not mix: one is organised under system.slice, the other directly under /sys/fs/cgroup. KEP-4033 (opens in a new tab) names mismatched drivers as a common cause of container creation failures and inconsistent resource accounting, with two configuration files that had to agree and nothing that checked they did.

The two log lines in the capture as text, v1.37.0 and v1.38.0-beta.0
k137  Using cgroup driver setting received from the CRI runtime" cgroupDriver="systemd"
k138  Using cgroup driver setting received from the CRI runtime" cgroupDriver="systemd"

The gate the preview names is absent from this build. LegacyCgroupDriverFallback returns no match in the beta kubelet binary and no entry in the feature-gate list at commit 43cbb94 (opens in a new tab). KEP-4033 (opens in a new tab) has said since its beta that the fallback would be removed in 1.38, and it names containerd 2.0 or CRI-O 1.28 as the floor once the runtime must answer.

Delete the field from your kubelet configuration and from the kubeadm configuration that writes it, since it does nothing today. Check the runtime version, which is the prerequisite that decides whether a node can start. Run the same check against the release candidate, because the rejection the preview describes is not in the beta we tested.

Swap follows the Pod, and the cgroup records it

With Linux nodes on cgroup v2 and LimitedSwap, the kubelet now sizes swap from the Pod’s pod-level memory settings. The preview states the consequence: when the pod-level request equals the limit, the Pod and every container in it get no swap, even where a container asks for less.

We applied one manifest to both nodes. The Pod requests and limits 300m and 192Mi; its single container requests 100m and 64Mi with limits of 200m and 128Mi, so the Pod’s request equals its limit while the container’s does not.

cgroup v1.37.0 v1.38.0-beta.0
Pod memory.swap.max max 0
Pod memory.max 201326592 201326592
Pod cpu.max 30000 100000 30000 100000
container memory.swap.max 0 0
container memory.max 134217728 134217728

Terminal capture of the cgroup values on both nodes for the same Pod manifest. On v1.37 the Pod cgroup memory.swap.max is max; on v1.38 it is 0; the container cgroup reads 0 on both, and both Pod cgroups read memory.max 201326592.

The same manifest on both nodes, captured at 03:56 UTC. The Pod line is the one that changed.

Two cgroup levels compared between v1.37 and v1.38. The Pod cgroup memory.swap.max reads max on v1.37 and 0 on v1.38, while the container cgroup reads max on both, so the Pod decided the budget.

The Pod’s numbers now decide the swap budget for everything inside it, which is the point of pod-level resources: one set of numbers for the Pod and one place to read the result. Before, the kubelet sized each container’s swap from that container’s own memory request, so a container could draw swap the Pod’s numbers never accounted for. On this node the container’s own value was 0 in both versions, so the number that moved is the Pod’s, and a container that requests less than its limit did not get a different value here.

We could not enable swap on this host to watch a workload feel the difference. swapon on a file inside the kind node fails with Invalid argument, and /proc/swaps stays empty, so the value is recorded and unused. On a node that has swap, read the file for a Pod you care about and compare it with the number you expect:

uid=$(kubectl get pod my-pod -o jsonpath='{.metadata.uid}' | tr '-' '_')
sudo cat /sys/fs/cgroup/kubelet.slice/kubelet-kubepods.slice/kubelet-kubepods-pod${uid}.slice/memory.swap.max

The webhook that stops seeing authentication reviews

Since v1.37, ExcludeAdmissionWebhookVirtualResources has been on by default, and it removes a set of virtual resources from admission webhooks: TokenReview, SelfSubjectReview, SubjectAccessReview, SelfSubjectAccessReview, LocalSubjectAccessReview and SelfSubjectRulesReview. The preview says the gate is planned to lock on when the feature reaches stable.

We deployed a webhook that logs every admission review by resource, with rules for tokenreviews, selfsubjectreviews and ConfigMaps, and watched what arrived on the beta.

The API server answers the configuration with a warning, which is the first place you will meet this change:

Warning: webhooks[0].rules[0]: tokenreviews.authentication.k8s.io is excluded from admission webhooks; this rule will have no effect
Warning: webhooks[0].rules[0]: selfsubjectreviews.authentication.k8s.io is excluded from admission webhooks; this rule will have no effect

At the default, kubectl auth whoami and kubectl auth can-i get pods produced no review at all; only a ConfigMap create reached the webhook. Turning the gate off on the API server changed that for whoami:

gate at default:
   1 review configmaps.v1 count=1

gate off (--feature-gates=ExcludeAdmissionWebhookVirtualResources=false):
   1 review configmaps.v1 count=1
   1 review selfsubjectreviews.v1.authentication.k8s.io count=1

The API server names the configuration and the excluded resources; in this capture that happened when the configuration was created:

"Admission webhook configuration names resources that are excluded from admission webhooks; the matching rules will have no effect" kind="ValidatingWebhookConfiguration" name="review-watcher" excludedResources=["selfsubjectreviews.authentication.k8s.io","tokenreviews.authentication.k8s.io"]

A policy engine that audited or annotated token reviews no longer receives them, and its rule is dead weight that only warns. In the other direction, a webhook that was failing those calls no longer sits on the authentication path, so a broken webhook cannot stop a token review from completing.

Search your webhook configurations before the upgrade, and read the API server log line rather than guessing from the rules:

kubectl get validatingwebhookconfigurations mutatingwebhookconfigurations \
  -o jsonpath='{range .items[*]}{.metadata.name}{"\t"}{.webhooks[*].rules}{"\n"}{end}' \
  | grep -E 'tokenreviews|subjectaccessreviews|selfsubjectreviews'

Two kubectl controls that stopped working

The preview says the KUBECTL_REMOTE_COMMAND_WEBSOCKETS and KUBECTL_PORT_FORWARD_WEBSOCKETS variables are removed in v1.38. We ran the same exec through both clients with KUBECTL_REMOTE_COMMAND_WEBSOCKETS=false and -v=6.

v1.37.2 posted to /exec and logged no WebSocket activity, which is the opt-out working. v1.38 sent a GET and logged the upgrade:

1.37: "Response" verb="POST" url="https://.../api/v1/namespaces/default/pods/execd/exec?..." status="101 Switching Protocols"
1.38: "Response" verb="GET"  url="https://.../api/v1/namespaces/default/pods/execd/exec?..." status="101 Switching Protocols"
1.38: websocket.go:134] "Subprotocol negotiated" protocol="v5.channel.k8s.io"

The variable no longer has any effect, so remove it from CI jobs and scripts. Nothing else changes, because WebSocket with a SPDY fallback was already the default.

The second control is the kuberc credential-plugin allowlist. In kubectl.config.k8s.io/v1 the name alias is gone, and the client says so:

kuberc: ignoring strict decoding error ... unknown field "credentialPluginAllowlist[0].name"
error occurred while applying preferences misconfigured credential plugin allowlist: empty allowlist entry #1

The same file with apiVersion: kubectl.config.k8s.io/v1beta1 is accepted, so the migration is to change name: to command: and move the file to v1 when you are ready. KEP-3104 (opens in a new tab) covers the preference file and the allowlist.

Four graduations, one migration you can start today

Three of the preview’s featured items are graduations, and each makes an API you already use stable. The fourth, EvictionRequest, is alpha.

Feature v1.37 state v1.38 state What to check
kuberc preferences kubectl.config.k8s.io/v1beta1 v1 stable, strict decoding allowlist entries use command
Pod-level resources beta, spec.resources in v1 API stable swap values on LimitedSwap nodes
DRA partitionable devices beta, firstAvailable in v1 API stable, gate locked on DRA drivers that advertise partitions
EvictionRequest alpha, gate off alpha, gate off not in this build

Pod-level resources are the clearest case. We applied the same Pod to a v1.37 node and it was accepted, and the Pod cgroup carried the Pod-level limits; the API and the enforcement already worked. What v1.38 adds is the stability promise and the swap rule described above. If you adopt pod-level resources now, plan for the swap value to change when the nodes move to 1.38.

DRA partitionable devices follow the same shape. firstAvailable is already in the resource.k8s.io/v1 API on v1.37, so the field is not new; the graduation locks DRAPartitionableDevices on. A partitionable device lets a driver advertise one GPU as a whole and as smaller parts, and the scheduler picks a combination that fits. Whether you can use it depends on your driver, not on the API version. The partitionable devices documentation (opens in a new tab) describes what a driver has to publish.

A locked gate removes the option to opt out. The feature file at this commit (opens in a new tab) marks PodLevelResources and DRAPartitionableDevices as GA with LockToDefault: true from 1.38 and schedules their removal in 1.41, so a cluster that turned either off in 1.37 has to stop doing that before the upgrade.

kuberc is the one graduation with a migration step you can do today, because the beta file and the v1 file differ in that name field. Aliases and default options keep working; only allowlist entries that used the alias need editing.

The alpha that is not in this build

EvictionRequest is the preview’s one new API. A node drain terminates a Pod whether or not the application has finished its work. The proposal lets a controller create an EvictionRequest, the kubelet or a responder finishes the work, and the existing eviction path with PodDisruptionBudgets stays as the fallback.

The gate is EvictionRequestAPI, alpha since 1.37 with a default of false. We enabled it on the beta API server and looked for the resource:

kubectl api-resources | grep -i eviction
(no output)
kubectl get --raw /openapi/v3 | grep eviction
(no path)

A responder is the part that does the work the application needs before termination, such as finishing a migration or releasing a lease. If no responder is registered, or one does not finish, the request falls back to the existing eviction path, which still honours PodDisruptionBudgets. The fallback is why a cluster that never creates an EvictionRequest sees no change, and why adopting the API early changes nothing until a responder exists.

The KEP (opens in a new tab) describes the coordination and the fallback. The build we tested does not publish the API even with the gate set, so there is nothing to evaluate yet on a cluster. Watch the release notes rather than the preview if you planned to test it this cycle.

cgroup v1 keeps its runway

Since v1.35 the kubelet refuses to start on a cgroup v1 node unless you set failCgroupV1: false, and the preview says the option remains in v1.38 while removal is planned for a future release. The option is in the beta kubelet binary; the refusal itself we could not reproduce, because this host is cgroup v2 only.

The check that matters is an inventory. On each node, stat -fc %T /sys/fs/cgroup prints cgroup2fs on a modern system and tmpfs on cgroup v1. A node that prints tmpfs needs a migration plan or the failCgroupV1: false stopgap, and the stopgap only postpones the migration.

The checks, in upgrade order

The order follows what blocks a node from starting, then what changes a workload, then what changes a client:

  1. Runtime floor: containerd 2.0 or CRI-O 1.28, from KEP-4033 (opens in a new tab).
  2. cgroupDriver: delete it from the kubelet and kubeadm configuration.
  3. cgroup v1 nodes: inventory them, and date any failCgroupV1: false stopgap.
  4. Release candidate: run the cgroup-driver check again.
  5. Webhooks: grep for the review resources, and read the API server warning.
  6. CI: drop both KUBECTL_*_WEBSOCKETS variables.
  7. kuberc: name becomes command, then the file moves to v1.
  8. After the upgrade: memory.swap.max on the Pods that need swap headroom.

Sources

Back to all articles

Technologies we work with

  • Argo CD
  • Kubernetes
  • Docker
  • Podman
  • Ansible
  • Jenkins
  • Chef
  • Proxmox VE
  • Google Cloud
  • Linux
  • Red Hat
  • CentOS
  • NGINX
  • Apache
  • Traefik
  • Prometheus
  • Grafana
  • PostgreSQL
  • MySQL
  • MariaDB
  • Redis
  • etcd
  • Qdrant
  • Elasticsearch
  • Logstash
  • Kibana
  • PagerDuty
  • Go
  • Python
  • FastAPI
  • PHP
  • TypeScript
  • React