More Info:
Explicitly set a service account private key file for service accounts on the controller manager.Risk Level
LowAddress
SecurityCompliance Standards
- CIS Kubernetes
Triage and Remediation
- Remediation
Remediation
Manual Steps
Manual Steps
-
On every control plane node, back up the controller manager static pod manifest:
-
Identify (or create if needed) the service account private key file on the control plane node (example path below); ensure it is readable by the controller-manager:
-
Edit the controller manager manifest to add or update the
--service-account-private-key-fileflag to point to that key file: -
If the key file path (
/etc/kubernetes/pki/sa.keyin this example) is not already mounted into the container, edit the manifest to add a hostPath volume and mount (this restart is automatic when you save the file):(Adjust if your manifest structure differs; saving the file will cause the kube-controller-manager static pod to restart.) -
Wait 30–60 seconds for the kubelet to restart the static pod, then verify on each control plane node that the controller manager process is using the correct flag and path:
Using kubectl
Using kubectl
kubectl cannot modify the kube-controller-manager static pod manifest or its process flags. This setting must be changed directly on each control plane node by editing
/etc/kubernetes/manifests/kube-controller-manager.yaml; see the Manual Steps section for detailed host-level instructions.Automation
Automation

