kubelet will not start
Static Pods that reference API objects are refused
Affects: Anyone with static Pod manifests, which includes every kubeadm control plane, if a manifest uses a Secret, ConfigMap, ServiceAccount or similar.
From 1.34 the kubelet denies admission to static Pods that reference API objects, so they can no longer run silently while their mirror Pod fails. 1.37 removed the PreventStaticPodAPIReferences feature gate that let you opt out. If a control-plane manifest in /etc/kubernetes/manifests is affected, that component does not come back after the kubelet upgrade.
What you see
static pods may not reference %s
From kubelet source, pkg/kubelet/config/common.go at v1.37.0; %s is the kind, for example configmaps (via configmap volumes).
Check before upgrading
sudo grep -nE 'serviceAccountName|secretKeyRef|configMapKeyRef|secretRef|configMapRef|configMap:|secret:|persistentVolumeClaim:|projected:|csi:|ephemeral:|resourceClaims' /etc/kubernetes/manifests/*.yaml
Any match. These are the references the kubelet checks: service accounts, Secrets and ConfigMaps (env or volumes), PVCs, CSI and ephemeral volumes, projected volumes and resource claims. Use your kubelet's staticPodPath if it is not the kubeadm default.
Fix
- Move the referenced data onto the node and mount it with hostPath, as kubeadm's own manifests do for certificates and kubeconfigs.
- Or run the workload as a normal Pod, DaemonSet or Deployment, which may reference API objects.
Sources: CHANGELOG-1.34: static pods that reference API objects denied (#131837) · Kubernetes v1.37 release post: PreventStaticPodAPIReferences removed