Skip to content
HoginHogin
Go back

Kubernetes 1.37 'Garhwal': what's worth adopting — Pod Certificates, Metrics API GA and manifest-based admission

11 мин чтения

Kubernetes 1.37 “Garhwal” shipped on August 26, 2026 — 67 enhancements: 16 stable, 23 beta, 27 alpha. This release isn’t about “rewrite everything now”; it’s about the cluster’s admin layer — identity, admission, metrics — finally reaching GA. But there’s one genuine breaking change (SELinux volumes), one deprecated kube-proxy mode, and a pile of things that become mandatory in 1.38. Below is the no-marketing breakdown: what to adopt in production, what to defer, and how to upgrade the lab so production doesn’t turn into a late-night serial.

Table of contents

Open Table of contents

What this release is actually about

Three quarters of 1.37 is AI/ML scheduling (gang scheduling, workload-aware preemption, DRA) and control-plane internals. The former matters if you run GPU farms — DRA got its own write-up earlier. The latter is invisible until your cluster gets big.

For an operator of an ordinary production cluster, five things in 1.37 matter:

Pod Certificates: mTLS without a separate kingdom

The problem is old: a pod needs a certificate to identify itself to peers, but Kubernetes only ever shipped ServiceAccount tokens. Hence SPIRE, cert-manager, homegrown cron jobs rotating Secrets: another stateful system to back up and upgrade.

Before: sidecar agents and cron Secret rotation. After: a projected volume with the cert

In 1.37, Pod Certificates (KEP-4317) and ClusterTrustBundles (KEP-3257) reached GA:

A migration note: v1 of the API drops the PKIXPublicKey and ProofOfPossession fields from PodCertificateRequest — clients that still set them (older custom signers) need updating.

That’s the short version. A full walkthrough with a signer controller example and a SPIRE comparison lands as a separate post on December 14.

metrics.k8s.io: nine years of beta is enough

metrics.k8s.io/v1beta1 has existed since 2017 — the API underpinning HPA, kubectl top, and half the monitoring scripts out there carried a “we may change this” label for nearly a decade. In 1.37 it was promoted to metrics.k8s.io/v1 with no schema changes (KEP-5207).

What that means in practice:

One caveat: the aggregated API is served by metrics-server — make sure your metrics-server release is new enough to serve v1.

Admission: policies on disk, not in the API

The most interesting part if you run a policy layer. Today, admission policies (CEL ValidatingAdmissionPolicy or webhook configurations) are ordinary API objects. That leaves three gaps: while the apiserver is up but the objects haven’t been applied yet, policies aren’t enforced (bootstrap gap); if etcd is down, policies don’t load; and above all — anyone with permissions on those objects can delete your policy engine, because the objects can’t protect themselves.

KEP-5793 (beta, enabled by default) closes this with files on disk:

# /etc/kubernetes/admission/policies/no-privileged.yaml
apiVersion: admissionregistration.k8s.io/v1
kind: ValidatingAdmissionPolicy
metadata:
  name: "deny-privileged.static.k8s.io"   # the .static.k8s.io suffix is mandatory
spec:
  failurePolicy: Fail
  matchConstraints:
    resourceRules:
    - apiGroups: [""]
      apiVersions: ["v1"]
      operations: ["CREATE", "UPDATE"]
      resources: ["pods"]
  validations:
  - expression: "!object.spec.containers.exists(c, c.securityContext.privileged == true)"
    message: "Privileged containers are not allowed"

It plugs in via the staticManifestsDir field of AdmissionConfiguration (the same file behind --admission-control-config-file):

apiVersion: apiserver.config.k8s.io/v1
kind: AdmissionConfiguration
plugins:
- name: ValidatingAdmissionPolicy
  configuration:
    apiVersion: apiserver.config.k8s.io/v1
    kind: ValidatingAdmissionPolicyConfiguration
    staticManifestsDir: "/etc/kubernetes/admission/policies/"

Policy in the API: bootstrap gap and no self-protection. Policy on disk: active from the first request

The rules: names must carry the .static.k8s.io suffix (creating REST objects with that suffix is blocked — no confusion); a valid manifest loads at startup, an invalid one prevents the apiserver from starting; edits are picked up live (fsnotify plus a one-minute polling fallback), and an invalid edit is ignored — the last valid version keeps running. Constraints: webhooks are clientConfig.url-only (no service references), policies get no paramKind. That’s the price of independence from the API.

In HA clusters the files must be distributed across control-plane nodes by config management — like the encryption config; there is no apiserver-to-apiserver synchronization.

And a free bonus of the beta: the ExcludeAdmissionWebhookVirtualResources gate (also on by default) — webhooks are no longer called for tokenreviews/subjectaccessreviews. A webhook intercepting those resources can wedge a cluster out of its own auth path; now they’re excluded, exactly as CEL policies always did. If your audit webhook logged SubjectAccessReviews — we covered Wazuh and audit logs here — audit its rules before upgrading: the apiserver logs a warning at startup naming the offenders.

Webhook auth: the apiserver will start introducing itself

The mirror image: until now, a webhook accepted any request hitting its endpoint. In 1.37 an alpha APIServerWebhookAuthenticationToken appears — the apiserver authenticates to admission webhooks with scoped ServiceAccount tokens. It’s alpha and off, but the direction is obvious: by 1.38 your webhooks should be able to verify who is calling them, not just TLS. If you run your own admission webhooks, now is the time to add Authorization-header validation instead of waiting for it to become mandatory.

HPA scale-to-zero and the rest of the beta shelf

Watch cache: paginated Range vs RangeStream with a worker pool

What can break: SELinuxMount GA

The only item flagged ACTION REQUIRED in the upgrade notes. SELinuxMount is GA and enabled: volumes mount with -o context=<label> instead of recursively relabeling files, provided the CSI driver opted in via .spec.seLinuxMount: true on the CSIDriver.

The trap: a single mount can’t carry two SELinux contexts. Pods with different labels sharing a volume — previously coexisting thanks to relabeling — now fail to start. If you run SELinux nodes (the RHEL stack) and shared volumes: run the upstream checklist before upgrading; for individual workloads the escape hatch is .spec.seLinuxChangePolicy: Recursive on the pod. Cluster-wide disable is available for one more release — 1.38 locks the behavior. Nodes without SELinux (Ubuntu/Debian defaults) are not affected at all.

Kubernetes 1.36 vs 1.37

1.361.37
Pod certificatesbetaGA: podCertificate volume + ClusterTrustBundle
metrics.k8s.iov1beta1 (since 2017)v1, schema unchanged
Admission policiesAPI objects only+ on-disk manifests (beta, on by default)
SELinux volumesrecursive relabelingmount with -o context (GA) — check shared PVs
HPA to zerobehind a flagbeta, minReplicas: 0 out of the box
Watch cache initpaginated Rangeetcd RangeStream, −40–55% warm-up time
kube-proxyipvs works silentlyipvs deprecated (warning; removal by 1.43)
Webhooks on SubjectAccessReviewintercept themexcluded (gate escape until GA)

What you need to upgrade (a 1.36 → 1.37 lab)

A checklist in order of pain. Run all of it on a lab clone before production.

Before the upgrade:

# 1. scheduling.k8s.io/v1alpha2 WAS objects must be removed
#    (v1alpha2 is dropped entirely — the apiserver won't start)
kubectl get workloads.v1alpha2.scheduling.k8s.io,podgroups.v1alpha2.scheduling.k8s.io -A 2>/dev/null

# 2. kubelet: legacy cAdvisor flags are no longer accepted
grep -rE 'storage-driver|global-housekeeping|container-hints' \
  /etc/sysconfig/kubelet /var/lib/kubelet/config.yaml 2>/dev/null

# 3. eventRecordQPS: 0 now truly means "no limit" — if it was set to 0
#    for the default's sake, set an explicit number (e.g. 50)

Also: check the SELinux volumes (above), make sure etcd 3.7.x is ready (kubeadm pulls it), and confirm nothing still depends on scheduling.k8s.io/v1alpha2.

The upgrade itself:

kubeadm upgrade plan
kubeadm upgrade apply v1.37.x
# nodes one by one, with drain
kubectl drain node1 --ignore-daemonsets --delete-emptydir-data
# apt install kubelet=1.37.x kubectl=1.37.x && systemctl restart kubelet
kubectl uncordon node1

Moving an admission policy to a manifest (do one, as a starter):

  1. Drop no-privileged.yaml (the example above) into /etc/kubernetes/admission/policies/ on every control-plane node — Ansible, or whatever distributes your encryption config.
  2. Add staticManifestsDir to the apiserver’s AdmissionConfiguration and restart it.
  3. Verify: kubectl run test --image=busybox --privileged must be denied with your message, even after the API-side ValidatingAdmissionPolicy is deleted.

HPA to zero — one field, but only with an external/object metric:

apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
  name: queue-worker
spec:
  minReplicas: 0        # scale-to-zero, beta in 1.37
  maxReplicas: 10
  metrics:
  - type: External      # CPU/memory won't do: no pods — no metric
    external:
      metric:
        name: queue_depth
      target:
        type: Value
        value: "5"

Webhooks: collect your ValidatingWebhookConfigurations and check whether any rules intercept tokenreviews/subjectaccessreviews — the 1.37 apiserver logs a warning at startup naming the guilty ones. And file a ticket for “validate the Authorization header in our admission webhooks” — you’ll want it by 1.38.

How to verify it all works

kubectl version                  # Server Version: v1.37.x

# metrics API v1 is alive
kubectl get --raw /apis/metrics.k8s.io/v1/nodes | head -c 300

# manifest-based admission actually works: delete the API policy —
# the protection must survive
kubectl delete validatingadmissionpolicy deny-privileged 2>/dev/null
kubectl run pwn --image=busybox --privileged   # Expected: Denied

# HPA condition at zero replicas
kubectl get hpa queue-worker -o jsonpath='{.status.conditions}'

In the metrics of your apiserver, watch apiserver_manifest_admission_config_controller_automatic_reloads_total{status="success"} — the counter of successful manifest reloads.

Bottom line

1.37 is a tech-debt repayment release for the admin layer: identity (Pod Certificates GA), policy (manifest-based admission), and observability (metrics v1) all reached stability at once, and the control plane learned to survive its own startup twice as fast. Upgrade the lab tomorrow; production after checking SELinux volumes and v1alpha2 objects — it’s an hour of work, not a project. Nothing is on fire, but there’s nowhere to park either: SELinuxMount locks in 1.38, ipvs dies by 1.43, and webhooks will soon have to check who’s calling them. It’s a fair trade: one evening with a checklist in exchange for a cluster whose policy layer can’t be wiped with a single kubectl delete.


Share this post:

Next Post
Grafana Alloy: one agent instead of a zoo — logs, metrics, traces and profiles in a single pipeline