Skip to main content

More Info:

Setup TLS connection on the API server.

Risk Level

Low

Address

Security

Compliance Standards

  • CIS Kubernetes

Triage and Remediation

Remediation

Manual Steps

  1. On every control plane node, confirm the current kube-apiserver options and identify whether --client-ca-file is present and what it is set to:
    If --client-ca-file is missing or incorrect, proceed.
  2. On the same control plane node, ensure you have (or create) a valid client CA file that will sign client certificates used to authenticate to the API server, for example:
    If you need a dedicated client CA, place it in a secure path such as /etc/kubernetes/pki/client-ca.crt and ensure it is readable by the kube-apiserver process:
  3. Edit the kube-apiserver static pod manifest on the control plane node:
    In the spec.containers[0].command list, add or correct the flag so it points to your chosen client CA file, for example:
    Save and exit. Editing this file will automatically restart the kube-apiserver static pod.
  4. Still on the control plane node, ensure the path in --client-ca-file matches an existing file and that the directory is not writable by non-privileged users:
  5. Wait for the kube-apiserver static pod to restart and become Ready:
  6. Verification (on every control plane node): confirm the running kube-apiserver process includes the correct --client-ca-file argument and path:
    Ensure the printed value matches the intended client CA file path.
kubectl cannot modify the kube-apiserver static pod manifest or its process flags, including --client-ca-file, because these are defined in /etc/kubernetes/manifests/kube-apiserver.yaml on each control plane node. To remediate this finding, make the changes directly on the node as described in the Manual Steps section.

Additional Reading: