Skip to main content

More Info:

Disable profiling, if not needed.

Risk Level

Medium

Address

Security

Compliance Standards

  • CIS Kubernetes

Triage and Remediation

Remediation

Manual Steps

  1. On every control plane node, back up the API server static pod manifest:
  2. On every control plane node, edit the manifest to ensure the --profiling flag is set to false in the kube-apiserver command:
    If there is no existing --profiling flag, add - --profiling=false under the command: (or args:) list for kube-apiserver using a text editor such as:
    and add a line:
  3. Wait for the kubelet on each control plane node to detect the manifest change and restart the kube-apiserver static pod (this happens automatically). You can monitor restart with:
  4. On every control plane node, verify that the running kube-apiserver process includes --profiling=false and does not include --profiling=true:
kubectl cannot modify the kube-apiserver static pod manifest or its process flags, so it cannot be used to set --profiling=false. To remediate this finding, you must edit /etc/kubernetes/manifests/kube-apiserver.yaml directly on every control plane node; see the Manual Steps section for the exact procedure.

Additional Reading: