A static Pod manifest uses a ConfigMap, Secret or service account
CommonManifests written before 1.34, or copied from a Deployment's Pod template, often take configuration from a ConfigMap or Secret, or set serviceAccountName. The kubelet now refuses all of these in a static Pod.
Confirm
sudo grep -nE 'serviceAccountName|secretKeyRef|configMapKeyRef|secretRef|configMapRef|configMap:|secret:|persistentVolumeClaim:|projected:|csi:|ephemeral:|resourceClaims' /etc/kubernetes/manifests/*.yaml
Any match in the file the kubelet log names
Fix
- Put the configuration on the node as a file and mount it with a hostPath volume, the way kubeadm's own manifests mount certificates and kubeconfigs.
- Or, if it does not need to start before the API server, run it as a DaemonSet or Deployment instead, where references are allowed.
- Move the original file out of the manifests directory before editing, to a directory the kubelet does not read, so a half-edited file is never picked up.