Skip to main content

More Info:

Verifies that the API server —profiling argument is set to false. Profiling exposes detailed system and program data that could aid an attacker.

Risk Level

Medium

Address

Security

Compliance Standards

  • CIS Kubernetes

Triage and Remediation

Remediation

Manual Steps

  1. On every control plane node, open the API server static pod manifest for editing:
  2. In the command: or args: list for kube-apiserver, locate any existing --profiling flag and change it to:
    If no --profiling flag is present, add this line under the other arguments, for example:
  3. Save and exit the editor. The kubelet will automatically detect the manifest change and restart the kube-apiserver static pod; expect a brief API server disruption during this restart.
  4. After 30–60 seconds, verify on the same control plane node that the kube-apiserver process is now running with --profiling=false:
  5. In the command output, confirm that --profiling=false appears and that there is no --profiling=true flag. Repeat steps 1–4 on every control plane node.
kubectl cannot modify the kube-apiserver static pod manifest or its process flags, so this finding cannot be fixed through the Kubernetes API. The change must be made directly on every control plane node in /etc/kubernetes/manifests/kube-apiserver.yaml; see the Manual Steps section for the exact procedure.