Skip to main content

More Info:

Always pull images.

Risk Level

Low

Address

Security

Compliance Standards

  • CIS Kubernetes

Triage and Remediation

Remediation

Manual Steps

  1. Open the kube-apiserver static pod manifest for editing
    On every control plane node:
  2. Locate the --enable-admission-plugins argument
    In the spec.containers[0].command list, find the line starting with:
  3. Ensure AlwaysPullImages is included in the plugins list
    Edit that line so it includes AlwaysPullImages somewhere in the comma-separated list, for example:
    If the argument is not present at all, add a new line in the command list:
  4. Save the file and allow kubelet to restart the API server
    Save and exit the editor. The kubelet will automatically detect the manifest change and restart the kube-apiserver pod. Be aware this briefly restarts the API server on this node.
  5. Verify the kube-apiserver process includes AlwaysPullImages
    After 10–30 seconds, on the same control plane node, run:
    Confirm the output contains an --enable-admission-plugins= argument whose value includes AlwaysPullImages.
kubectl cannot be used to enable the AlwaysPullImages admission plugin because this setting is defined in the kube-apiserver static pod manifest on the host. To remediate this finding, edit /etc/kubernetes/manifests/kube-apiserver.yaml directly on every control plane node as described in the Manual Steps section.

Additional Reading: