On this page
Kubernetes v1.38 is planned for Wednesday 16 December 2026. The release team’s sneak peek of 23 November lists two removals in kubectl, two breaking changes on the node, two longer-running changes that reach another stage, and four enhancements expected to graduate or arrive.
Most of this release is quiet for workloads. The parts that need attention sit at the edges of a platform: developer workstations and CI images that carry kubectl settings, kubelet configuration files that still name a cgroup driver, admission webhooks that expect to see access reviews, and pods on swap-enabled nodes that use pod-level resources.
This article goes through each change from the point of view of an upgrade, records which of them were already in the Kubernetes source tree when it was written, and ends with a small scanner that finds the affected files in a repository before the upgrade does.
Release status
A sneak peek describes intent. Features can slip between the announcement and the release, so each item below was compared with the v1.38.0-beta.0 tag and with master at commit ce9710e5 of 27 November 2026, ten days after code freeze.
| Change | Announced | State in the source tree |
|---|---|---|
| kubectl WebSocket opt-out variables | Removed | Removed. In the changelog since v1.38.0-alpha.3. |
| kuberc | Stable | kubectl.config.k8s.io/v1 is present; its allowlist entry has command only. |
| Pod-level resources | Stable | PodLevelResources is GA and locked on in master. It was still beta at beta.0. |
| DRA partitionable devices | Stable | DRAPartitionableDevices is GA and locked on. |
| Swap with pod-level resources | Behaviour change | The kubelet sets the pod cgroup swap limit from pod-level memory. |
| Cgroup driver from the runtime only | Breaking change | Not in master at that commit: no LegacyCgroupDriverFallback gate, and kubeadm still defaults cgroupDriver to systemd. |
| Review requests excluded from webhooks | Ongoing | ExcludeAdmissionWebhookVirtualResources is beta and on by default, as in v1.37. |
| EvictionRequest API | Alpha | lifecycle.k8s.io/v1alpha1 types and a controller are present; the gate is off by default. |
Everything here describes a release that has not shipped. The cgroup driver change is the one to watch: it was announced with a pull request reference and had not merged into master by 27 November. Read the final v1.38 release notes before acting on that item.

kubectl changes
WebSocket opt-out variables
kubectl has used WebSockets by default for exec, attach and cp since v1.30 and for port-forward since v1.31. Two environment variables let a user switch back to SPDY: KUBECTL_REMOTE_COMMAND_WEBSOCKETS and KUBECTL_PORT_FORWARD_WEBSOCKETS. Both are removed in v1.38. kubectl tries WebSockets first and falls back to SPDY when the server side cannot upgrade, which is what it already does by default.
The difference is visible on the wire. With KUBECTL_REMOTE_COMMAND_WEBSOCKETS=false, kubectl v1.37.3 sent Upgrade: SPDY/3.1 for an exec; kubectl v1.38.0-beta.0 with the same variable negotiated a WebSocket (v5.channel.k8s.io) against the same v1.37.0 cluster.
The variables are ignored after the upgrade, so nothing fails at the point where they are set. The risk is in why they were set. A script that exports them usually does so because a proxy or load balancer between the client and the API server mishandled the WebSocket upgrade. Test kubectl exec and kubectl port-forward through that path with a v1.38 client before the client is rolled out to CI images.
kuberc
kuberc is a separate kubectl file for user preferences: command aliases, default option values and a policy for exec credential plugins. It holds no cluster details or credentials, and lives at $HOME/.kube/kuberc unless --kuberc or the KUBERC variable points elsewhere. It graduates to stable in v1.38 with the API version kubectl.config.k8s.io/v1.
One field does not make the move. In the beta API an entry in credentialPluginAllowlist could use name as an alias for command. The alias has been deprecated since v1.36 and is absent from the v1 type. A beta file that uses it looks like this:
apiVersion: kubectl.config.k8s.io/v1beta1
kind: Preference
defaults:
- command: apply
options:
- name: server-side
default: "true"
- command: delete
options:
- name: interactive
default: "true"
credentialPluginPolicy: Allowlist
credentialPluginAllowlist:
- name: aws
- command: /usr/local/bin/kubeloginThe stable form uses command on every entry:
apiVersion: kubectl.config.k8s.io/v1
kind: Preference
defaults:
- command: apply
options:
- name: server-side
default: "true"
- command: delete
options:
- name: interactive
default: "true"
credentialPluginPolicy: Allowlist
credentialPluginAllowlist:
- command: aws
- command: /usr/local/bin/kubeloginThe credential plugin policy is a security control. With Allowlist, kubectl runs only the exec plugins listed, which limits what a kubeconfig file from an untrusted source can execute on a workstation. A v1 file that keeps the old key does not degrade quietly: kubectl v1.38.0-beta.0 reported the unknown field, then stopped with misconfigured credential plugin allowlist: empty allowlist entry #1 and exit code 1, for every command.
Change the API version last. kubectl v1.37.3 given the v1 file failed with no valid preferences found, while the v1.38 pre-release client still read the v1beta1 file, alias included. A shared kuberc file should therefore move to command entries now and stay on v1beta1 until every workstation and CI image has a v1.38 client.
Node changes
Cgroup driver discovery
The kubelet and the container runtime must agree on the cgroup driver, systemd or cgroupfs. For years that agreement was manual: the same value was written into the kubelet configuration and the runtime configuration, and a mismatch left a node unstable or unable to run pods. KEP-4033 replaced the manual step with a CRI call, RuntimeConfig, through which the runtime reports its driver. The feature has been stable since v1.34.
The sneak peek announces the next step for v1.38. The kubelet stops accepting the legacy mechanism by default: the cgroupDriver field in the kubelet configuration is deprecated and rejected unless the temporary LegacyCgroupDriverFallback feature gate is enabled. kubeadm no longer writes cgroupDriver: systemd, and its preflight checks report an error when the runtime does not support the call.
%%{init: {'theme': 'base', 'themeVariables': {'primaryColor': '#FFF3E0', 'primaryTextColor': '#232F3E', 'primaryBorderColor': '#FF9900', 'lineColor': '#232F3E', 'clusterBkg': '#F8FAFC', 'clusterBorder': '#CBD5E1', 'edgeLabelBackground': '#FFFFFF', 'nodeTextColor': '#232F3E'}}}%%
flowchart TD
A[Kubelet starts] --> B{cgroupDriver set in kubelet configuration}
B -- "Yes, fallback gate off" --> R[Configuration rejected]
B -- "No, or fallback gate on" --> C{Runtime answers RuntimeConfig over CRI}
C -- Yes --> D[Use the driver the runtime reports]
C -- "No, after retries" --> E{LegacyCgroupDriverFallback enabled}
E -- Yes --> F[Use cgroupDriver from kubelet configuration]
E -- No --> G[Exit with an error before the node registers]
classDef ok fill:#F0FFF4,stroke:#1D8102,stroke-width:2px,color:#145202
classDef bad fill:#FEF2F2,stroke:#D13212,stroke-width:2px,color:#991B1B
classDef step fill:#FFF3E0,stroke:#FF9900,stroke-width:2px,color:#232F3E
classDef ask fill:#EBF8FF,stroke:#0073BB,stroke-width:2px,color:#004C74
class A,F step
class B,C,E ask
class D ok
class R,G badTwo operational consequences follow. The runtime must be running before the kubelet starts, because the kubelet now depends on its answer; a kubelet that cannot get the driver after retrying exits before the node registers. And runtimes that predate the call are no longer usable. KEP-4033 names containerd 1.7 as the last supported runtime without it and sets the minimums at containerd 2.0 and CRI-O 1.28. The CONTAINER-RUNTIME column of kubectl get nodes -o wide shows what each node runs.
The field is not always in a file you wrote. A kind v0.33.0 cluster on Kubernetes v1.37.0, which kubeadm builds, reported "cgroupDriver": "systemd" from the kubelet’s configz endpoint although no one typed it. Read the running configuration of a node with kubectl get --raw "/api/v1/nodes/NODE/proxy/configz" to see what the kubelet is using, and check the release notes for how kubeadm upgrade treats the stored value.
A kubelet configuration that needs attention, from the sample fixtures:
apiVersion: kubelet.config.k8s.io/v1beta1
kind: KubeletConfiguration
cgroupDriver: systemd
failCgroupV1: false
memorySwap:
swapBehavior: LimitedSwapCheck the unit ordering on node images you build yourself. If the kubelet can start before containerd or CRI-O is ready to serve CRI, a reboot can leave the node unregistered. Managed node groups get this from the provider’s image; custom images and bare-metal nodes do not.
cgroup v1
The second line in that file, failCgroupV1: false, is the setting that has allowed the kubelet to start on cgroup v1 hosts since v1.35. It remains available in v1.38. KEP-5573 covers the removal of cgroup v1 support in a later release, so a node pool that still needs the setting has a migration to schedule, not an action for this upgrade.
Pod-level resources and swap
Pod-level resources let a pod declare CPU, memory and hugepages requests and limits once, in spec.resources, for all of its containers together. Containers may still set their own values inside that budget. When both levels are present, the pod-level values are the ones used for scheduling and for the pod’s quality-of-service class. The feature has been on by default since v1.34 and is expected to be stable in v1.38, with its feature gate locked on. It is not supported for Windows pods.
The graduation brings one behaviour change on Linux nodes that use cgroup v2 and are configured with LimitedSwap. The kubelet applies swap limits from the pod-level memory settings. If the pod-level memory request equals the pod-level memory limit, the pod gets no swap. That holds for every container in it, including a container whose own memory request is lower than its limit.
The fixture below is a Deployment that this change affects:
apiVersion: apps/v1
kind: Deployment
metadata:
name: report-worker
namespace: reporting
spec:
replicas: 2
selector:
matchLabels:
app: report-worker
template:
metadata:
labels:
app: report-worker
spec:
resources:
requests:
cpu: "1"
memory: 2Gi
limits:
memory: 2Gi
containers:
- name: worker
image: registry.example.com/reporting/worker:4.2.0
resources:
requests:
memory: 1Gi
limits:
memory: 1536Mi
- name: log-shipper
image: registry.example.com/platform/log-shipper:1.9.3The pod-level memory request and limit are both 2Gi. The worker container sets a 1Gi request under a 1536Mi limit, which on its own describes a container that may burst. Under the v1.38 rule the pod-level pair decides, and the pod is not given swap on a LimitedSwap node. On a v1.37.0 cluster the API server accepted this manifest and gave its pods the Burstable class, because the CPU request has no matching limit. A pod can be Burstable and still be excluded from swap; the memory pair is what counts.
A pod that has been leaning on swap to absorb short memory peaks will meet its memory limit sooner after the upgrade, and the result is an OOM kill, not a slowdown. Find these pods before the node upgrade and decide for each one whether to lower the pod-level request or raise the limit.
Admission webhooks and review resources
Since v1.37 the API server no longer sends admission webhooks the virtual writes made to six authentication and authorization resources: TokenReview, SelfSubjectReview, SubjectAccessReview, SelfSubjectAccessReview, LocalSubjectAccessReview and SelfSubjectRulesReview. These objects are never stored; creating one is how a client asks who it is or whether an action is allowed. The behaviour is controlled by the ExcludeAdmissionWebhookVirtualResources feature gate, on by default.
A webhook configuration whose rules name one of these resources still applies cleanly, with a deprecation warning on create and update, and the API server logs the affected configurations at startup. The webhook itself is not called. A configuration of that kind:
apiVersion: admissionregistration.k8s.io/v1
kind: ValidatingWebhookConfiguration
metadata:
name: access-review-recorder
webhooks:
- name: reviews.audit.example.com
admissionReviewVersions: ["v1"]
sideEffects: None
failurePolicy: Ignore
clientConfig:
service:
namespace: audit
name: review-recorder
path: /validate
rules:
- apiGroups: ["authorization.k8s.io"]
apiVersions: ["v1"]
operations: ["CREATE"]
resources: ["subjectaccessreviews", "selfsubjectaccessreviews"]
- apiGroups: ["authentication.k8s.io"]
apiVersions: ["v1"]
operations: ["CREATE"]
resources: ["tokenreviews"]
---
apiVersion: admissionregistration.k8s.io/v1
kind: MutatingWebhookConfiguration
metadata:
name: label-defaulter
webhooks:
- name: labels.platform.example.com
admissionReviewVersions: ["v1"]
sideEffects: None
clientConfig:
service:
namespace: platform
name: label-defaulter
path: /mutate
rules:
- apiGroups: ["*"]
apiVersions: ["*"]
operations: ["CREATE"]
resources: ["*"]The first configuration exists only to observe access reviews and has been inert since the cluster reached v1.37. A server-side dry run against v1.37.0 returns one warning for each named resource:
$ kubectl apply --dry-run=server -f fixtures/before/webhooks.yaml
Warning: webhooks[0].rules[0]: subjectaccessreviews.authorization.k8s.io is excluded from admission webhooks; this rule will have no effect
Warning: webhooks[0].rules[0]: selfsubjectaccessreviews.authorization.k8s.io is excluded from admission webhooks; this rule will have no effect
Warning: webhooks[0].rules[1]: tokenreviews.authentication.k8s.io is excluded from admission webhooks; this rule will have no effect
validatingwebhookconfiguration.admissionregistration.k8s.io/access-review-recorder created (server dry run)
mutatingwebhookconfiguration.admissionregistration.k8s.io/label-defaulter created (server dry run)The second configuration uses wildcards, draws no warning, and is unaffected in practice, because a label defaulter has no interest in review requests. A dry run is therefore a quick way to find explicit rules in a live cluster. Disabling the feature gate restores the old behaviour for now; the gate is planned to be locked on when the feature reaches stable, so that is a way to buy time and nothing more.
If a webhook that records or restricts access reviews is cited as a control in an ISO 27001, SOC 2 or HIPAA evidence pack, that control stopped working at v1.37 without an error. API server audit logging records these requests and is the place to move the control. Update the control description and the evidence source together.
New and graduating features
DRA partitionable devices
With Dynamic Resource Allocation, a driver can advertise a device such as a GPU both as a whole and as smaller partitions. The scheduler allocates only combinations that fit inside the physical device, so a partition and the whole device are never handed out together. The feature is expected to be stable in v1.38 with DRAPartitionableDevices locked on. It matters to platforms that share accelerators between inference workloads; it changes nothing for clusters without a DRA driver.
EvictionRequest API
PodDisruptionBudgets answer one question: how many pods of this application may be down at once. They give the application no time to act before a specific pod goes. The EvictionRequest API, alpha in v1.38, adds that step. A controller that wants a pod gone creates an EvictionRequest naming the pod by name and UID. An eviction request controller coordinates the responders declared for that pod, which can finish work, release resources or move data, and report progress.
%%{init: {'theme': 'base', 'themeVariables': {'signalColor': '#0073BB', 'signalTextColor': '#0F172A', 'actorBkg': '#FFF3E0', 'actorBorder': '#FF9900', 'actorTextColor': '#232F3E', 'noteBkgColor': '#FFF8E7', 'noteBorderColor': '#FF9900', 'noteTextColor': '#232F3E', 'lineColor': '#232F3E'}}}%%
sequenceDiagram
participant Q as Requester
participant C as Eviction request controller
participant R as Responder
participant E as Pod eviction API
Q->>C: Create EvictionRequest for the pod
C->>R: Mark responder active
R-->>C: Heartbeat and expected completion
alt Responder completes
R-->>C: Completed, pod removed or moved
else No responder, or responder does not finish
C->>E: Evict the pod
Note over E: PodDisruptionBudget is still enforced
E-->>C: Evicted, or blocked and retried
end
C-->>Q: Status condition on the EvictionRequestThe fallback is the existing API-initiated eviction, which still respects PodDisruptionBudgets, so the new API adds to PDBs and does not replace them. Using it needs both the EvictionRequestAPI feature gate and the lifecycle.k8s.io/v1alpha1 API group enabled. Being alpha, the API can change incompatibly and belongs in a test cluster. It is worth an early look for stateful platforms where a node drain today means a fixed grace period and hope.
Readiness check
Five of the changes above can be found by reading files: shell scripts and CI definitions, kuberc files, kubelet configuration, webhook configurations and workload manifests. The sample for this article is a small Python scanner that does that. It reads files only and never connects to a cluster, so it can run in a pull-request pipeline against a GitOps repository.
| Check | Severity | Finds |
|---|---|---|
K138-ENV | Warn | The two removed kubectl variables in any text file |
K138-KUBERC | Action, Info | Allowlist entries that use name; files still on v1beta1 |
K138-CGROUPDRIVER | Action | cgroupDriver set in a KubeletConfiguration |
K138-CGROUPV1 | Warn | failCgroupV1: false |
K138-WEBHOOK | Action, Info | Webhook rules that name review resources, or reach them by wildcard |
K138-SWAP | Warn | Pod-level memory request equal to the limit while a container can burst |
The checks are plain functions that take a parsed object and return findings. They treat a field of the wrong type as absent, because the scanner runs over repositories with half-finished and third-party manifests, and one malformed file should not stop the scan. Memory quantities are compared as exact decimals, so 0.5Gi and 512Mi are equal.
"""The five checks. Each takes parsed input and returns a list of findings.
Checks never raise on malformed manifests: a field of the wrong type is
treated as absent, because the scanner runs over repositories it does not own.
"""
from __future__ import annotations
from collections.abc import Iterator, Mapping, Sequence
from decimal import Decimal
from typing import Any
from .findings import Finding, Severity
from .quantity import QuantityError, parse_quantity
KEP_4006 = "https://kubernetes.dev/resources/keps/4006"
KEP_3104 = "https://kubernetes.dev/resources/keps/3104"
KEP_4033 = "https://kubernetes.dev/resources/keps/4033"
KEP_5573 = "https://kubernetes.dev/resources/keps/5573"
KEP_5793 = "https://kubernetes.dev/resources/keps/5793"
KEP_2837 = "https://kubernetes.dev/resources/keps/2837"
REMOVED_KUBECTL_ENV_VARS = (
"KUBECTL_REMOTE_COMMAND_WEBSOCKETS",
"KUBECTL_PORT_FORWARD_WEBSOCKETS",
)
KUBERC_GROUP = "kubectl.config.k8s.io"
# Virtual review resources that admission webhooks no longer receive.
REVIEW_RESOURCES = {
"authentication.k8s.io": {"tokenreviews", "selfsubjectreviews"},
"authorization.k8s.io": {
"subjectaccessreviews",
"selfsubjectaccessreviews",
"localsubjectaccessreviews",
"selfsubjectrulesreviews",
},
}
WEBHOOK_KINDS = {"ValidatingWebhookConfiguration", "MutatingWebhookConfiguration"}
# Where the pod spec sits inside each workload kind.
POD_SPEC_PATHS: dict[str, tuple[str, ...]] = {
"Pod": ("spec",),
"Deployment": ("spec", "template", "spec"),
"StatefulSet": ("spec", "template", "spec"),
"DaemonSet": ("spec", "template", "spec"),
"ReplicaSet": ("spec", "template", "spec"),
"Job": ("spec", "template", "spec"),
"CronJob": ("spec", "jobTemplate", "spec", "template", "spec"),
}
def _mapping(value: Any) -> Mapping[str, Any]:
return value if isinstance(value, Mapping) else {}
def _sequence(value: Any) -> Sequence[Any]:
return value if isinstance(value, list) else []
def _dig(doc: Mapping[str, Any], path: Sequence[str]) -> Mapping[str, Any]:
current: Any = doc
for key in path:
current = _mapping(current).get(key)
return _mapping(current)
def _subject(doc: Mapping[str, Any]) -> str:
meta = _mapping(doc.get("metadata"))
name = meta.get("name") or "<unnamed>"
namespace = meta.get("namespace")
kind = doc.get("kind") or "<no kind>"
return f"{kind}/{namespace}/{name}" if namespace else f"{kind}/{name}"
def check_env_vars(path: str, text: str) -> list[Finding]:
"""Removed kubectl opt-out variables anywhere in a text file."""
findings: list[Finding] = []
for number, line in enumerate(text.splitlines(), start=1):
for variable in REMOVED_KUBECTL_ENV_VARS:
if variable in line:
findings.append(
Finding(
check="K138-ENV",
severity=Severity.WARN,
path=path,
subject=f"line {number}",
message=(
f"{variable} is removed in kubectl v1.38 and is ignored. "
"kubectl tries WebSockets first and falls back to SPDY."
),
action=(
"Delete the variable. If it was set to force SPDY through a proxy "
"that blocks WebSocket upgrades, test exec and port-forward through "
"that proxy with kubectl v1.38 before rolling it out."
),
reference=KEP_4006,
)
)
return findings
def check_kuberc(path: str, doc: Mapping[str, Any]) -> list[Finding]:
"""kuberc Preference files: the allowlist `name` alias and the beta API version."""
api_version = str(doc.get("apiVersion", ""))
if doc.get("kind") != "Preference" or not api_version.startswith(f"{KUBERC_GROUP}/"):
return []
findings: list[Finding] = []
for index, entry in enumerate(_sequence(doc.get("credentialPluginAllowlist"))):
if "name" in _mapping(entry):
findings.append(
Finding(
check="K138-KUBERC",
severity=Severity.ACTION,
path=path,
subject=f"credentialPluginAllowlist[{index}]",
message=(
"Allowlist entry uses `name`. The field was a beta alias for `command`, "
f"deprecated since v1.36, and does not exist in {KUBERC_GROUP}/v1."
),
action="Rename the key to `command`. Do not set both keys on one entry.",
reference=KEP_3104,
)
)
if api_version != f"{KUBERC_GROUP}/v1":
findings.append(
Finding(
check="K138-KUBERC",
severity=Severity.INFO,
path=path,
subject="apiVersion",
message=f"File declares {api_version}; kubectl v1.38 adds the stable {KUBERC_GROUP}/v1.",
action=(
"Move to v1 once every workstation and CI image runs kubectl v1.38 or later. "
"Older clients do not know the v1 version."
),
reference=KEP_3104,
)
)
return findings
def check_kubelet_config(path: str, doc: Mapping[str, Any]) -> list[Finding]:
"""KubeletConfiguration: explicit cgroup driver and the cgroup v1 escape hatch."""
if doc.get("kind") != "KubeletConfiguration":
return []
findings: list[Finding] = []
driver = doc.get("cgroupDriver")
if driver:
findings.append(
Finding(
check="K138-CGROUPDRIVER",
severity=Severity.ACTION,
path=path,
subject="cgroupDriver",
message=(
f"cgroupDriver is set to {driver!r}. The v1.38 sneak peek announces that the "
"kubelet takes the driver from the container runtime over CRI and rejects "
"this field unless the LegacyCgroupDriverFallback feature gate is enabled."
),
action=(
"Confirm the node's runtime answers the CRI RuntimeConfig call (containerd 2.0 "
"or later, CRI-O 1.28 or later per KEP-4033), make sure the runtime starts "
"before the kubelet, then remove the field. Check the final release notes: "
"this change was announced before it merged."
),
reference=KEP_4033,
)
)
if doc.get("failCgroupV1") is False:
findings.append(
Finding(
check="K138-CGROUPV1",
severity=Severity.WARN,
path=path,
subject="failCgroupV1",
message=(
"failCgroupV1 is false, so this node configuration is meant for cgroup v1 hosts. "
"The setting still works in v1.38; cgroup v1 support is scheduled for removal "
"in a later release."
),
action="Plan the move of these nodes to a cgroup v2 operating system image.",
reference=KEP_5573,
)
)
return findings
def _rule_review_matches(rule: Mapping[str, Any]) -> tuple[set[str], bool]:
"""Return (explicitly named review resources, matched only through wildcards)."""
groups = {str(g) for g in _sequence(rule.get("apiGroups"))}
resources = {str(r).split("/", 1)[0].lower() for r in _sequence(rule.get("resources"))}
named: set[str] = set()
wildcard = False
for group, review_resources in REVIEW_RESOURCES.items():
if group not in groups and "*" not in groups:
continue
hits = resources & review_resources
if hits:
named |= {f"{group}/{resource}" for resource in hits}
elif "*" in resources:
wildcard = True
return named, wildcard and not named
def check_webhooks(path: str, doc: Mapping[str, Any]) -> list[Finding]:
"""Webhook rules that select authentication or authorization review resources."""
if doc.get("kind") not in WEBHOOK_KINDS:
return []
findings: list[Finding] = []
subject_prefix = _subject(doc)
for webhook in _sequence(doc.get("webhooks")):
webhook_map = _mapping(webhook)
webhook_name = webhook_map.get("name") or "<unnamed>"
named_all: set[str] = set()
wildcard_any = False
for rule in _sequence(webhook_map.get("rules")):
named, wildcard = _rule_review_matches(_mapping(rule))
named_all |= named
wildcard_any = wildcard_any or wildcard
if named_all:
findings.append(
Finding(
check="K138-WEBHOOK",
severity=Severity.ACTION,
path=path,
subject=f"{subject_prefix} webhook {webhook_name}",
message=(
"Rules name review resources that the API server no longer sends to "
"admission webhooks (ExcludeAdmissionWebhookVirtualResources, on by "
f"default since v1.37): {', '.join(sorted(named_all))}."
),
action=(
"Remove these resources from the rules. If a control depends on seeing "
"these requests, move it to audit policy or an authorization webhook; "
"the feature gate will be locked on when the feature reaches stable."
),
reference=KEP_5793,
)
)
elif wildcard_any:
findings.append(
Finding(
check="K138-WEBHOOK",
severity=Severity.INFO,
path=path,
subject=f"{subject_prefix} webhook {webhook_name}",
message=(
"A wildcard rule covers the authentication or authorization API groups. "
"The webhook is no longer called for review resources in those groups."
),
action="No change needed unless the webhook's logic expects review requests.",
reference=KEP_5793,
)
)
return findings
def _memory(resources: Mapping[str, Any], section: str) -> Decimal | None:
raw = _mapping(resources.get(section)).get("memory")
if raw is None:
return None
try:
return parse_quantity(raw)
except QuantityError:
return None
def _containers(pod_spec: Mapping[str, Any]) -> Iterator[Mapping[str, Any]]:
for key in ("initContainers", "containers"):
for container in _sequence(pod_spec.get(key)):
yield _mapping(container)
def check_pod_level_swap(path: str, doc: Mapping[str, Any]) -> list[Finding]:
"""Pods whose pod-level memory request equals the limit while a container can burst.
On a cgroup v2 node with LimitedSwap, v1.38 sizes swap from the pod-level
memory settings. Request equal to limit means no swap for the whole pod,
including containers whose own request is below their limit.
"""
spec_path = POD_SPEC_PATHS.get(str(doc.get("kind")))
if spec_path is None:
return []
pod_spec = _dig(doc, spec_path)
pod_resources = _mapping(pod_spec.get("resources"))
pod_limit = _memory(pod_resources, "limits")
if pod_limit is None:
return []
pod_request = _memory(pod_resources, "requests")
containers = list(_containers(pod_spec))
container_requests = [_memory(_mapping(c.get("resources")), "requests") for c in containers]
if pod_request is None:
# The API server defaults a missing pod-level request to the pod-level
# limit only when no container sets a memory request. With container
# requests present it sums them, which this static check does not model.
if any(request is not None for request in container_requests):
return []
pod_request = pod_limit
if pod_request != pod_limit:
return []
burstable = []
for container in containers:
resources = _mapping(container.get("resources"))
request, limit = _memory(resources, "requests"), _memory(resources, "limits")
if request is not None and (limit is None or request < limit):
burstable.append(str(container.get("name") or "<unnamed>"))
if not burstable:
return []
return [
Finding(
check="K138-SWAP",
severity=Severity.WARN,
path=path,
subject=_subject(doc),
message=(
"Pod-level memory request equals the pod-level limit, and these containers set a "
f"memory request below their limit: {', '.join(burstable)}. On LimitedSwap nodes "
"v1.38 gives this pod no swap, including those containers."
),
action=(
"If the workload relies on swap, set the pod-level memory request below the "
"pod-level limit and retest on a v1.38 node. If it does not, no change is needed."
),
reference=KEP_2837,
)
]
DOCUMENT_CHECKS = (check_kuberc, check_kubelet_config, check_webhooks, check_pod_level_swap)The command-line entry point walks the given paths, skips binary files and files over 2 MB, reports YAML it cannot parse (unrendered Helm templates, mostly) as skipped, and opens kind: List wrappers so that kubectl get -o yaml output can be scanned directly. The exit code is 1 when a finding reaches the --fail-on severity.
python3 -m venv .venv
.venv/bin/pip install -r requirements.txt
.venv/bin/python -m pytest -q
.venv/bin/python -m k138check fixtures/before
.venv/bin/python -m k138check fixtures/after
.venv/bin/python -m k138check path/to/manifests path/to/ci --format json --fail-on warnWebhook configurations and running pods are not always in Git. Export them and scan the files:
kubectl get validatingwebhookconfigurations,mutatingwebhookconfigurations -o yaml > webhooks.yaml
kubectl get pods -A -o yaml > pods.yamlTest results
Scanner
The repository carries two fixture trees: fixtures/before with the five files shown in this article, and fixtures/after with the same files corrected. The scanner reports nine findings on the first tree and none on the second.
| Check | File | Severity | Subject |
|---|---|---|---|
K138-CGROUPDRIVER | kubelet-config.yaml | Action | cgroupDriver |
K138-KUBERC | kuberc | Action | credentialPluginAllowlist[0] |
K138-WEBHOOK | webhooks.yaml | Action | access-review-recorder: three review resources named |
K138-CGROUPV1 | kubelet-config.yaml | Warn | failCgroupV1 |
K138-ENV | ci-debug.sh | Warn | line 5 |
K138-ENV | ci-debug.sh | Warn | line 6 |
K138-SWAP | report-worker.yaml | Warn | Deployment reporting/report-worker, container worker |
K138-KUBERC | kuberc | Info | apiVersion |
K138-WEBHOOK | webhooks.yaml | Info | label-defaulter: wildcard rule |
$ python -m k138check fixtures/before | tail -n 1
5 files, 5 objects scanned: 3 action, 4 warn, 2 info, 0 skipped
$ python -m k138check fixtures/after
5 files, 4 objects scanned: 0 action, 0 warn, 0 info, 0 skippedCluster checks
The same pipeline starts a kind cluster and runs two kubectl clients against it: the current stable client and the v1.38 pre-release. There is no v1.38 node image yet, so the server side is v1.37.0 and the results below describe client behaviour and the behaviour v1.37 already has.
| Check | kubectl v1.37.3 | kubectl v1.38.0-beta.0 |
|---|---|---|
exec, variable unset | WebSocket | WebSocket |
exec, KUBECTL_REMOTE_COMMAND_WEBSOCKETS=false | SPDY/3.1 | WebSocket; variable ignored |
kuberc v1beta1 with name | Accepted | Accepted |
kuberc v1 with command | Fails: no valid preferences found | Accepted |
kuberc v1 with name | Fails: no valid preferences found | Fails: empty allowlist entry |
| Check on the v1.37.0 cluster | Result |
|---|---|
| Webhook rules naming review resources, server dry run | Three warnings, one per named resource; none for the wildcard rule |
| Deployment with pod-level resources | Accepted; pods are Burstable |
| Feature gates reported by the API server | PodLevelResources beta on, ExcludeAdmissionWebhookVirtualResources beta on, EvictionRequestAPI alpha off |
Kubelet configz | cgroupDriver: systemd, failCgroupV1: true; runtime containerd 2.3.4 |
The scanner has limits that matter. It cannot see which nodes use LimitedSwap or which runtime version a node runs; those are facts about nodes, not files. It does not model the case where a pod-level memory request is left out and the API server derives it from container requests. And its cgroup driver check follows the announcement, so its wording should be revisited when the release notes are final.

Production considerations
- Order of work. The kubectl and webhook items are independent of the cluster version and can be closed now. The kubelet and swap items belong to the node upgrade and need a canary node pool.
- Client skew. kubectl is supported within one minor version of the API server. Upgrade clients to v1.38 close to the control plane upgrade, and keep shared kuberc files readable by the oldest client still in use.
- Managed services. EKS, AKS and GKE add a new minor on their own schedule after the upstream release and own the node image, runtime version and kubelet configuration for managed node groups. Custom images, self-managed node groups and kubeadm clusters carry the cgroup driver change themselves.
- Feature gates as fallbacks.
LegacyCgroupDriverFallbackand disablingExcludeAdmissionWebhookVirtualResourcesare both temporary. Record each use with an owner and a removal date, or it becomes the blocker for the next upgrade. - Swap. Canary the node upgrade on a pool that runs the swap-dependent workloads, and watch OOM kills and container restarts for a full business cycle before continuing.
- Observability. Alert on nodes that fail to register after a reboot and on kubelet restart loops during the rollout. Those are the symptoms of a runtime that did not answer the CRI call.
Upgrade plan
| When | Action | Owner |
|---|---|---|
| Now | Run the scanner over GitOps repositories, CI definitions and exported webhook configurations | Platform |
| Now | Remove the kubectl variables; rename name to command in kuberc files | Developers, CI |
| Now | Remove review resources from webhook rules; move any dependent control to audit logging | Security |
| After rc.0 (scheduled 3 December) | Re-read the changelog for the cgroup driver change and adjust the plan | Platform |
| Before node upgrade | Confirm runtime versions and unit ordering; remove cgroupDriver from kubelet configuration | Platform |
| Before node upgrade | Review pods flagged for swap on LimitedSwap pools | Application teams |
| After upgrade | Move kuberc files to v1; evaluate EvictionRequest in a test cluster | Platform |
| Next two releases | Move remaining cgroup v1 nodes to cgroup v2 images | Platform |
Key takeaways
- v1.38 is planned for 16 December 2026; the changes that need action are in kubectl settings, kubelet configuration, webhook rules and swap behaviour, not in workload APIs.
- The two removed kubectl variables are ignored, not rejected: the v1.38 pre-release client used WebSockets with the opt-out set. Test exec and port-forward through any proxy that was the reason for setting them.
- The kubelet is set to take the cgroup driver from the container runtime only. That change had not merged ten days after code freeze, so confirm it in the release notes before changing node configuration.
- With pod-level resources, a memory request equal to the limit means no swap for the whole pod on
LimitedSwapnodes. - Webhooks that watch access reviews have not been called since v1.37. Move the control to audit logging.
If your upgrade turns up a change that is not covered here, leave a comment with the details.
Announced changes were read from the Kubernetes v1.38 sneak peek of 23 November 2026 and compared with the Kubernetes source at tag v1.38.0-beta.0 and at master commit ce9710e5 (27 November 2026): feature gate definitions, the kuberc v1 and v1beta1 types, the lifecycle v1alpha1 types, the kubelet swap helpers and CHANGELOG-1.38.md. The scanner’s 43 tests pass with Python 3.13, PyYAML 6.0.3 and pytest 9.0.2 on hand-written fixtures. Cluster checks ran in GitHub Actions on 28 November 2026 (run 46174504597, commit 5d2ab8b): kind v0.33.0, Kubernetes v1.37.0, containerd 2.3.4, kubectl v1.37.3 and v1.38.0-beta.0. No v1.38 control plane or kubelet was run, so the swap and cgroup driver changes are described from the announcement and the source.
The complete sample for this article is on GitHub: nithinmohantk/blog-samples-working-repo/k8s-138-upgrade-readiness. Clone it with git clone https://github.com/nithinmohantk/blog-samples-working-repo.git and open the k8s-138-upgrade-readiness folder. Its README says how to run it and what has been verified.
Glossary
- cgroup driver
- The mechanism the kubelet and container runtime use to manage control groups: systemd or cgroupfs. Both must use the same one.
- CRI
- Container Runtime Interface, the gRPC API between the kubelet and a runtime such as containerd or CRI-O.
- RuntimeConfig
- The CRI call through which a runtime reports configuration to the kubelet, including its cgroup driver.
- cgroup v2
- The unified Linux control group hierarchy. Kubernetes features such as swap limits require it.
- LimitedSwap
- A kubelet swap behaviour in which eligible pods get a bounded amount of swap sized from their memory request.
- Pod-level resources
- Requests and limits declared in spec.resources for the whole pod instead of per container.
- kuberc
- A kubectl preferences file for aliases, default options and credential plugin policy, separate from kubeconfig.
- Exec credential plugin
- A program named in a kubeconfig file that kubectl runs to obtain credentials.
- Admission webhook
- An HTTP callback the API server calls to validate or mutate a request before it is stored.
- SubjectAccessReview
- A request that asks the API server whether a given user may perform a given action. It is answered, not stored.
- DRA
- Dynamic Resource Allocation, the Kubernetes API for requesting devices such as GPUs through drivers.
- PodDisruptionBudget
- A limit on how many pods of an application may be voluntarily disrupted at one time.
- Feature gate
- A named switch that turns a Kubernetes feature on or off. Stable features are locked on and the gate is later removed.
References & Further Reading
- → Kubernetes v1.38 Sneak Peek— Kubernetes blog, 23 November 2026
- → CHANGELOG-1.38— Pre-release changelog; the full release notes land here
- → KEP-4006: Transition from SPDY to WebSockets— kubectl streaming protocol
- → Kubectl user preferences (kuberc)— Schema, allowlist matching rules and the name deprecation
- → KEP-4033: Discover cgroup driver from CRI— RuntimeConfig, runtime minimum versions, removal plan
- → KEP-5573: Remove cgroup v1 support— Timeline for cgroup v1
- → Assign Pod-level CPU and memory resources— Task page with examples and limitations
- → KEP-2837: Pod Level Resource Specifications— Design, defaulting and swap behaviour
- → KEP-5793— Referenced by the sneak peek for the webhook review-resource change
- → KEP-4563: EvictionRequest API— Requesters, responders and the eviction fallback
- → DRA: partitionable devices— How drivers advertise whole devices and partitions
- → Sample code for this article— k8s-138-upgrade-readiness in blog-samples-working-repo
Discover more from C4: Container, Code, Cloud & Context
Subscribe to get the latest posts sent to your email.