Cloud & infrastructure

Kubernetes v1.38 removes legacy cgroup and kubectl fallbacks

Kubernetes v1.38 drops support for cgroup v1 opt-outs, removes WebSocket environment variables, and enforces strict container runtime checks.

Abstract illustration of Kubernetes nodes connecting to a central control plane
Illustration generated for this article

The Kubernetes project has outlined critical changes for the upcoming v1.38 release, scheduled for December 16, 2026. This update focuses on removing legacy configuration mechanisms and stabilizing long-standing features, requiring immediate attention from platform engineers to maintain cluster stability.

What happened

The release team identified several deprecations and breaking changes that will affect production environments. Most notably, the kubelet will no longer allow legacy configuration of the cgroup driver unless a specific temporary feature gate is enabled. This shift forces nodes to rely on the Container Runtime Interface (CRI) to report the correct cgroup driver before the kubelet starts. If the runtime does not support this remote procedure call, the kubelet will fail to register the node entirely.

Additionally, two environment variables used to opt out of WebSocket connections in kubectl are being removed. Since version 1.30, kubectl exec, attach, and cp have used WebSockets by default, falling back to SPDY only when necessary. The variables KUBECTL_REMOTE_COMMAND_WEBSOCKETS and KUBECTL_PORT_FORWARD_WEBSOCKETS previously allowed users to disable this behavior. In v1.38, these variables will have no effect, and the client will always attempt WebSockets first.

The kuberc file, which separates user preferences from cluster credentials, is graduating to stable. As part of this graduation, the API version changes from v1beta1 to v1. The new API removes the name field from credential plugin allowlist entries, requiring users to switch to the command field. Any configurations still using name will break upon upgrade.

How it works

The change to cgroup driver detection moves responsibility from static configuration files to dynamic runtime negotiation. Previously, administrators manually set the cgroup driver in the kubelet config. Now, the kubelet queries the container runtime via the CRI RuntimeConfig RPC. This ensures the kubelet and runtime agree on whether to use cgroup v1 or v2 without manual intervention. If the runtime cannot provide this information, the kubelet exits with an error to prevent mismatched cgroup hierarchies, which can cause resource accounting failures.

For admission webhooks, the default behavior now excludes virtual resources like TokenReview and SubjectAccessReview. This reduces the load on webhooks and prevents potential security loops where a webhook might inadvertently block authentication reviews. The feature gate ExcludeAdmissionWebhookVirtualResources is enabled by default, meaning webhooks will no longer see these requests unless the gate is explicitly disabled. This change prepares the system for locking the gate in future stable releases.

Key details

  • Release date: Kubernetes v1.38 is planned for Wednesday, December 16, 2026.
  • Cgroup v1 phase-out: The failCgroupV1: false kubelet option remains but is a short-term fix; full removal is planned for a future release.
  • kubectl cleanup: Scripts setting KUBECTL_REMOTE_COMMAND_WEBSOCKETS or KUBECTL_PORT_FORWARD_WEBSOCKETS must remove these variables as they will be ignored.
  • Kuberc API change: Credential plugin allowlists must use command instead of name in the kubectl.config.k8s.io/v1 API.
  • Swap limits: On Linux nodes with LimitedSwap and cgroup v2, pods with equal memory request and limit will have zero swap available.
  • New alpha API: The EvictionRequest API allows coordinated pod eviction, giving applications time to clean up before termination.

Why it matters

These changes signal a decisive move away from legacy infrastructure patterns. The enforcement of CRI-based cgroup driver detection means that older container runtimes that do not support the RuntimeConfig RPC will become incompatible. Platform teams must verify their runtime versions before upgrading, as failure to do so will result in nodes that refuse to join the cluster. This eliminates a common source of subtle bugs where the kubelet and runtime used different cgroup drivers, but it raises the barrier for entry for older systems.

For developers building CI/CD pipelines, the removal of WebSocket opt-out variables simplifies the client behavior but removes a safety valve for networks that strictly block WebSocket traffic. Teams relying on SPDY for legacy network compatibility must now ensure their infrastructure supports WebSockets. Additionally, the stabilization of pod-level resources and DRA partitionable devices offers more granular control over hardware allocation, which is critical for AI and high-performance computing workloads running on Kubernetes.

What you can do

  • Audit your CI/CD scripts and remove any references to KUBECTL_REMOTE_COMMAND_WEBSOCKETS and KUBECTL_PORT_FORWARD_WEBSOCKETS.
  • Update kuberc files to replace name with command in credential plugin allowlist entries before upgrading to v1.38.
  • Verify that your container runtime supports the CRI RuntimeConfig RPC and starts before the kubelet.
  • Review workloads using LimitedSwap on cgroup v2 nodes to ensure they do not rely on swap when memory request equals limit.
  • Test admission webhooks to ensure they do not depend on receiving TokenReview or SubjectAccessReview requests.
  • Plan migration from cgroup v1 to cgroup v2 if you are currently using the failCgroupV1: false workaround.
  • #kubernetes
  • #devops
  • #cgroup
  • #kubectl
  • #platform-engineering

Tools from the Bytechap store

Keep reading

All stories