Skip to content

Kubernetes v1.38.0-rc.0 Hands-On Labs: Pod-Level In-Place Resize, DRA Partitionable & Binding Gates, kuberc v1, and Live Upgrade

Test Date: 2026-12-05 | Cluster Version: Upgraded in-place from v1.37.2 to v1.38.0-rc.0 (built with Go 1.27.4, etcd 3.7.3-0, CoreDNS v1.15.0, pause 3.10.2) | Environment: 3-node linux/amd64 cluster (1 control plane + 2 workers, cgroup v2 unified hierarchy, containerd://2.4.2, Cilium data plane without kube-proxy) | Verification Standard: Every manifest, command, Linux cgroup v2 readout, scheduler event, and latency number below is measured live on v1.38.0-rc.0.

Kubernetes v1.38.0-rc.0 shipped on December 4, 2026 (ahead of the planned December 16 GA release). Rather than laying groundwork alone, v1.38 graduates four headline capabilities directly impacting AI inference, sidecar efficiency, and GPU/accelerator orchestration to Stable / GA, alongside KEP-4033 (CRI cgroupDriver discovery), KEP-3104 (kuberc v1), and KEP-4006 (WebSockets transition).

We upgraded a live 3-node cluster in-place from v1.37.2 to v1.38.0-rc.0 with zero workload evictions, then ran 5 end-to-end hands-on labs covering every headline feature and real upgrade pitfall with reproducible manifests, measured numbers, and architecture diagrams.


1. Executive Summary of Verified Results

Lab Module KEP & 1.38 Stage Live Cluster Measurement
Lab 1 · Pod-Level Resources KEP-2837 (GA) On the same 1-core / 512Mi quota, app and sidecar share a Pod-level pool with Guaranteed QoS; 600 MB SHA-256 burst latency drops from 5,592 ms (static split) to 2,835 ms (1.97×)
Lab 2 · Pod-Level In-Place Resize KEP-5419 (GA) Live --subresource=resize updates (500m → 1000m → 2000m) converge in host cgroup v2 within 0.84–1.32 s with restartCount=0 and unchanged containerID; 2-worker throughput scales linearly from 105.2 to 428.3 MB/s (4.07×)
Lab 3A · DRA Partitionable Devices KEP-4815 (GA) One 141Gi / 100 CU physical GPU sharedCounters packs mig-a (227 ms) + mig-b (249 ms) concurrently, cleanly blocks overlapping whole-GPU gpu0-full (Unschedulable), and backfills gpu0-full in 222 ms upon release
Lab 3B · DRA Binding Conditions KEP-5007 (GA) Devices with bindingConditions: [FabricReady] reserve the claim while holding the Pod at BindingConditionsPending; patching FabricReady=True binds in 1,923 ms; patching FabricFailed=True aborts PreBind cleanly so the Pod never lands on a broken fabric
Lab 4 · kuberc v1 & WebSockets KEP-3104 / KEP-4006 (GA) kubectl.config.k8s.io/v1 aliases work and reject the dropped legacy name allowlist field; even with KUBECTL_REMOTE_COMMAND_WEBSOCKETS=false, exec negotiates 101 Switching Protocols (v5.channel.k8s.io)
Lab 5 · CRI cgroupDriver Discovery KEP-4033 (1.38 Tightening) After removing static cgroupDriver: systemd from cm/kubelet-config and node config while preserving custom containerRuntimeEndpoint, all 3 nodes auto-discover systemd from containerd 2.4.2

2. Lab 1: Pod-Level Resources (KEP-2837 GA) & cgroup v2 Proof

Historically, multi-container Pods (application + logging/proxy sidecars, or LLM serving + model-loader sidecars) had to partition CPU and memory statically across each container—forcing teams to over-provision every container to avoid OOMKills or CPU throttling.

Kubernetes v1.38 graduates PodLevelResources (KEP-2837) along with PodLevelResourcesFixDefaulting and PodLevelResourcesFixKubeletQOSClass to GA, letting sibling containers dynamically share a unified spec.resources budget defined at the Pod level.

2.1 Controlled Comparison (Identical 1-Core / 512Mi Quota)

We deployed two Pods on the same worker node reserving the exact same cluster quota (cpu: 1, memory: 512Mi): - pod-level-shared: Pod-level requests == limits = 1 / 512Mi; app and sidecar only specify baseline requests: 200m / 128Mi with no container-level hard limits. - container-level-split: Traditional static split giving app and sidecar 500m / 256Mi each.

apiVersion: v1
kind: Pod
metadata:
  name: pod-level-shared
  namespace: k8s138-lab
spec:
  restartPolicy: Never
  resources:
    requests:
      cpu: "1"
      memory: "512Mi"
    limits:
      cpu: "1"
      memory: "512Mi"
  containers:
    - name: app
      image: docker.io/library/ubuntu:24.04
      command: ["bash", "-lc", "sleep 3600"]
      resources:
        requests:
          cpu: "200m"
          memory: "128Mi"
    - name: sidecar
      image: docker.io/library/ubuntu:24.04
      command: ["bash", "-lc", "sleep 3600"]
      resources:
        requests:
          cpu: "200m"
          memory: "128Mi"

2.2 Host cgroup v2 Hierarchy Verification & Burst Benchmark

Inspecting /sys/fs/cgroup/kubepods.slice/ directly on the worker node reveals exactly why Pod-level pooling works:

# Verified on worker node (Linux cgroup v2 unified hierarchy)
=== pod-level-shared (status.qosClass = Guaranteed) ===
  pod cgroup cpu.max:      100000 100000   # 1.0 core cap shared by all containers
  pod cgroup memory.max:   536870912       # 512 MiB cap shared by all containers
  container app cpu.max:   100000 100000   # can burst up to full 1.0 core when sidecar is idle
  container sidecar max:   100000 100000

=== container-level-split (status.qosClass = Guaranteed) ===
  pod cgroup cpu.max:      100000 100000
  pod cgroup memory.max:   536870912
  container app cpu.max:   50000 100000    # hard-throttled at 0.5 core even when sidecar is idle
  container sidecar max:   50000 100000

Running 3 rounds of a 600 MB sha256sum CPU burst inside app while sidecar sits idle: - container-level-split: 5,776 / 5,592 / 5,546 ms (median 5,592 ms); - pod-level-shared: 2,781 / 2,835 / 2,840 ms (median 2,835 ms)—1.97× faster burst completion under the exact same cluster reservation and Guaranteed QoS class.


3. Lab 2: Pod-Level In-Place Vertical Scaling (KEP-5419 GA)

Paired with KEP-2837, v1.38 promotes InPlacePodLevelResourcesVerticalScaling (KEP-5419) to GA: operators can patch Pod-level CPU and memory budgets live via --subresource=resize without restarting or recreating any container.

For AI inference and data workloads, this solves the classic startup-spike dilemma—for instance, giving an inference Pod generous CPU and host memory while loading weights or CPU-pinned PLE tables, then shrinking in-place once steady-state serving begins without dropping active connections.

3.1 Live /resize Command & 6-Step Measured Results

We executed 6 live Pod-level resizes on the running pod-level-shared Pod (both single-worker 600 MB and 2-worker parallel 800 MB benchmarks), polling /sys/fs/cgroup/cpu.max and memory.max inside the container while confirming containerID and restartCount:

# Resize Pod-level resources live via the /resize subresource (zero restart)
kubectl -n k8s138-lab patch pod pod-level-shared \
  --subresource=resize --type=merge \
  -p '{"spec":{"resources":{"requests":{"cpu":"2","memory":"1Gi"},"limits":{"cpu":"2","memory":"1Gi"}}}}'
Workload Mode Target Pod Resources cgroup v2 Convergence Container cpu.max / memory.max 3-Round Median Measured Throughput (Scaling) restartCount / containerID
1-Worker 600 MB 500m / 256Mi 1,119.7 ms 50000 100000 / 256 MiB 5,758 ms 104.2 MB/s (1.00×) 0 / Unchanged
1-Worker 600 MB 1000m / 512Mi 1,206.7 ms 100000 100000 / 512 MiB 2,855 ms 210.2 MB/s (2.02×) 0 / Unchanged
1-Worker 600 MB 2000m / 1Gi 1,315.6 ms 200000 100000 / 1 GiB 2,587 ms 231.9 MB/s (1-core bound) 0 / Unchanged
2-Worker 800 MB 500m / 256Mi 892.8 ms 50000 100000 / 256 MiB 7,606 ms 105.2 MB/s (1.00×) 0 / Unchanged
2-Worker 800 MB 1000m / 512Mi 858.1 ms 100000 100000 / 512 MiB 3,704 ms 216.0 MB/s (2.05×) 0 / Unchanged
2-Worker 800 MB 2000m / 1Gi 840.5 ms 200000 100000 / 1 GiB 1,868 ms 428.3 MB/s (4.07×) 0 / Unchanged

K8s 1.38 Pod-Level Resources & In-Place Resize Benchmark

Across all 6 live /resize steps, cgroup v2 limits converged in 0.84–1.32s with restartCount=0 and identical containerID, delivering textbook 1.00× → 2.05× → 4.07× linear compute scaling on the exact same running process.


4. Lab 3: DRA Partitionable Devices (KEP-4815 GA) & Binding Conditions (KEP-5007 GA)

For AI and GPU infrastructure teams, the biggest leap in v1.38 lands in resource.k8s.io/v1 (Dynamic Resource Allocation): both DRAPartitionableDevices and DRADeviceBindingConditions graduate to GA.

Scope Note: This lab publishes genuine resource.k8s.io/v1 DeviceClass and ResourceSlice objects to test the real kube-scheduler v1.38.0-rc.0 allocation engine, sharedCounters mutual exclusion, and PreBind binding gates directly at the control plane (without a physical vendor GPU node plugin injecting device files into containers).

4.1 Architecture & Reproducible ResourceSlice Manifests

flowchart LR
    CS["ResourceSlice 1: sharedCounters<br/>gpu0-hw (141Gi / 100 CU)<br/>gpu1-hw (141Gi / 100 CU)"] --> DEV["ResourceSlice 2: devices<br/>gpu0-full | gpu0-mig-a | gpu0-mig-b<br/>gpu1-nvlink-gated (bindingConditions)"]
    DEV --> SCH["kube-scheduler v1.38.0-rc.0<br/>DynamicResources Plugin"]
    SCH -->|"KEP-4815: 70+70 <= 141Gi"| MIG["pod-mig1 + pod-mig2 Scheduled<br/>pod-full0 Blocked (Unschedulable)"]
    SCH -->|"KEP-5007: PreBind Hold"| GATE["claim-fabric Reserved<br/>Event: BindingConditionsPending"]
    GATE -->|"PATCH FabricReady=True"| OK["Bound to worker-2 (1,923 ms)"]
    GATE -->|"PATCH FabricFailed=True"| ABORT["PreBind Aborted (FabricLinkError)"]

One important resource.k8s.io/v1 schema constraint to note: a single ResourceSlice cannot specify both sharedCounters and devices—you publish two slices under the same pool (resourceSliceCount: 2):

apiVersion: resource.k8s.io/v1
kind: DeviceClass
metadata:
  name: dra-lab.aik8s.dev
spec:
  selectors:
    - cel:
        expression: 'device.driver == "dra-lab.aik8s.dev"'
---
apiVersion: resource.k8s.io/v1
kind: ResourceSlice
metadata:
  name: dra-lab-counters
spec:
  driver: dra-lab.aik8s.dev
  nodeName: worker-2
  pool:
    name: pool-worker-2
    generation: 1
    resourceSliceCount: 2
  sharedCounters:
    - name: gpu0-hw
      counters:
        memory:
          value: 141Gi
        compute-units:
          value: "100"
    - name: gpu1-hw
      counters:
        memory:
          value: 141Gi
        compute-units:
          value: "100"
---
apiVersion: resource.k8s.io/v1
kind: ResourceSlice
metadata:
  name: dra-lab-devices
spec:
  driver: dra-lab.aik8s.dev
  nodeName: worker-2
  pool:
    name: pool-worker-2
    generation: 1
    resourceSliceCount: 2
  devices:
    - name: gpu0-full
      attributes:
        profile:
          string: "full-141g"
      consumesCounters:
        - counterSet: gpu0-hw
          counters:
            memory:
              value: 141Gi
            compute-units:
              value: "100"
    - name: gpu0-mig-a
      attributes:
        profile:
          string: "mig-70g"
      consumesCounters:
        - counterSet: gpu0-hw
          counters:
            memory:
              value: 70Gi
            compute-units:
              value: "50"
    - name: gpu0-mig-b
      attributes:
        profile:
          string: "mig-70g"
      consumesCounters:
        - counterSet: gpu0-hw
          counters:
            memory:
              value: 70Gi
            compute-units:
              value: "50"
    - name: gpu1-nvlink-gated
      attributes:
        profile:
          string: "nvlink-fabric-141g"
      bindsToNode: true
      bindingConditions:
        - FabricReady
      bindingFailureConditions:
        - FabricFailed
      consumesCounters:
        - counterSet: gpu1-hw
          counters:
            memory:
              value: 141Gi
            compute-units:
              value: "100"

4.2 Verified Flow: Counter Mutual Exclusion & FabricReady / FabricFailed Gates

K8s 1.38 DRA Partitionable Devices & Binding Conditions Verified Flow

  1. Lab 3A (KEP-4815 Partitionable Shared Counters):
  2. pod-mig1 and pod-mig2 each request profile == "mig-70g" and schedule onto gpu0-mig-a (227.4 ms) and gpu0-mig-b (248.5 ms) on the same physical gpu0-hw counterSet (consuming 140Gi / 100 CU).
  3. Submitting pod-full0 requesting the overlapping whole-GPU profile == "full-141g" is cleanly blocked (Unschedulable: cannot allocate all claims), preventing hardware overcommitment.
  4. Deleting pod-mig1 and pod-mig2 frees the counters and pod-full0 immediately schedules onto gpu0-full in 222.0 ms!
  5. Lab 3B (KEP-5007 Device Binding Conditions):
  6. Submitting pod-fabric claiming gpu1-nvlink-gated allocates and reserves claim-fabric (status.allocation set to gpu1-nvlink-gated, reservedFor count 1), while holding pod.spec.nodeName = None and emitting BindingConditionsPending: waiting for binding conditions for device.
  7. Patching FabricReady=True via --subresource=status on claim-fabric (simulating NVSwitch / Fabric Manager attachment) releases the gate and binds the Pod in 1,923.3 ms!
  8. Injecting FabricFailed=True (reason: FabricLinkError) on claim-fabric-fail triggers immediate PreBind abort so the Pod never lands on a degraded fabric:
BindingConditionsPending  waiting for binding conditions for device on node worker-2
FailedScheduling          running PreBind plugin "DynamicResources": device binding failed: claim=claim-fabric-fail, reason=FabricLinkError, message="Simulated NVLink fabric attachment failure"

5. Lab 4: kuberc v1 (KEP-3104 GA) & WebSockets (KEP-4006 GA)

Pairing kubectl v1.38.0-rc.0 with the upgraded cluster verified both CLI/streaming GA features along with two real behavioral gotchas:

5.1 kuberc Graduated to kubectl.config.k8s.io/v1 (Two Real Gotchas)

apiVersion: kubectl.config.k8s.io/v1
kind: Preference
aliases:
  - name: nodesw
    command: get
    appendArgs:
      - nodes
      - -o
      - wide
  • Working invocation: KUBERC=./kuberc-v1.yaml kubectl nodesw --context my-cluster cleanly expands to get nodes -o wide.
  • Gotcha 1 (Flag placement): Putting global flags before an alias (kubectl --context my-cluster nodesw) fails with Error: flags cannot be placed before plugin name: --context; place global flags after the alias name.
  • Gotcha 2 (Breaking change reproduced): The legacy name alias inside credentialPluginAllowlist from v1beta1 is removed in v1 (replaced by command). Passing name produces a strict decoding error:
kuberc: ignoring strict decoding error in kuberc-legacy-name.yaml: strict decoding error: unknown field "credentialPluginAllowlist[0].name"
error occurred while applying preferences misconfigured credential plugin allowlist: empty allowlist entry #1

5.2 KEP-4006: WebSockets Permanently Standard, Legacy Opt-Out Env Vars Removed

In v1.38, KUBECTL_REMOTE_COMMAND_WEBSOCKETS and KUBECTL_PORT_FORWARD_WEBSOCKETS are removed. Running kubectl exec -v=6 with KUBECTL_REMOTE_COMMAND_WEBSOCKETS=false confirms kubectl unconditionally negotiates WebSockets (204 ms):

$ KUBECTL_REMOTE_COMMAND_WEBSOCKETS=false kubectl -n k8s138-lab exec -v=6 pod-level-shared -c app -- echo "ws-ok"
round_trippers.go:632] "Response" verb="GET" url="https://.../exec?command=echo&command=ws-ok&container=app&stderr=true&stdout=true" status="101 Switching Protocols" milliseconds=204
websocket.go:134] "Subprotocol negotiated" protocol="v5.channel.k8s.io"
ws-ok

6. Lab 5: Live v1.37.2 → v1.38.0-rc.0 In-Place Upgrade & KEP-4033 Lessons

The figure below summarizes all 6 Pod-level /resize cgroup v2 convergence measurements alongside DRA scheduling, binding-gate, and WebSocket handshake latencies:

Kubernetes v1.38.0-rc.0 Measured Control-Plane & cgroup v2 Latencies

Upgrading our 3-node cluster (Anolis OS 8.8 + cgroup v2 + containerd 2.4.2 + Cilium without kube-proxy) in-place from v1.37.2 to v1.38.0-rc.0 surfaced 4 directly reusable operational takeaways:

  1. KEP-4033 Static cgroupDriver Cleanup: v1.38 rejects static cgroupDriver: systemd in KubeletConfiguration by default in favor of CRI RuntimeConfig discovery. Remove cgroupDriver from both kube-system/cm/kubelet-config and each node's /var/lib/kubelet/config.yaml before restarting kubelet; live /configz confirms failCgroupV1: True and auto-discovered systemd.
  2. Preserve Custom CRI Sockets Across kubeadm upgrade: If your nodes use a non-default containerd socket (e.g., unix:///run/custom-containerd/containerd.sock), set containerRuntimeEndpoint in cm/kubelet-config and annotate every node with kubeadm.alpha.kubernetes.io/cri-socket before running kubeadm upgrade, otherwise kubeadm upgrade node will overwrite /var/lib/kubelet/config.yaml with an empty endpoint.
  3. Complete Offline Image Bundle: Alongside the three v1.38.0-rc.0 control-plane images, kubeadm upgrades etcd:3.7.3-0 (from 3.7.0-0), coredns/coredns:v1.15.0 (from v1.14.6), and keeps pause:3.10.2. Pre-importing these into containerd's k8s.io namespace allows a fully offline kubeadm upgrade apply, and proxy.disabled: true cleanly skips kube-proxy.
  4. Zero-Eviction Rolling Worker Upgrades: Backing up configs, running kubeadm upgrade node, atomically swapping the kubelet binary, and restarting kubelet keeps existing stateful pods and local-PV workloads running continuously inside containerd with zero restarts.