Skip to main content

More Info:

Verifies that —client-ca-file is set so the API server can authenticate clients using certificates signed by the configured certificate authority.

Risk Level

High

Address

Security

Compliance Standards

  • CIS Kubernetes

Triage and Remediation

Remediation

Manual Steps

  1. Prepare or identify the client CA file (every control plane node)
    • Ensure you have a PEM‑encoded CA certificate that signs client certs for kube-apiserver auth, e.g.:
      /etc/kubernetes/pki/client-ca.crt
    • If it does not exist yet, copy or create the appropriate CA file on each control plane node at that path with root ownership and restricted permissions:
  2. Edit the kube-apiserver static pod manifest (every control plane node)
    • Open the manifest in an editor:
    • In the spec.containers[0].command list, add or update the argument so it includes:
    • Save and exit.
      Operational impact: because this is a static pod manifest, the kubelet will automatically restart the API server container when the file is saved.
  3. Ensure the CA file is mounted into the pod (if needed) (every control plane node)
    • In the same file /etc/kubernetes/manifests/kube-apiserver.yaml, confirm there is a volumeMounts entry for the directory containing the CA file, for example:
    • And a corresponding volumes entry:
    • Adjust the mountPath, name, and path only if your existing manifest uses different values.
  4. Wait for kube-apiserver to restart and stabilize (every control plane node)
    • Monitor the pod restart (from any machine with kubectl access):
    • Wait until the kube-apiserver pod is in Running and Ready state.
  5. Verify the kube-apiserver process has the client-ca-file flag set (every control plane node)
    • Run:
    • Confirm the output includes the argument with the correct path, for example:
kubectl cannot modify the API server’s host-level configuration or its static pod manifest. To set --client-ca-file, you must edit /etc/kubernetes/manifests/kube-apiserver.yaml directly on every control plane node; see the Manual Steps section for the exact procedure.