Skip to main content

More Info:

Verifies that —kubelet-client-certificate and —kubelet-client-key are set so the API server authenticates to kubelets over TLS. Without them the apiserver-kubelet connection is not mutually authenticated.

Risk Level

High

Address

Security

Compliance Standards

  • CIS Kubernetes

Triage and Remediation

Remediation

Manual Steps

  1. Generate or obtain a dedicated client certificate and key for the apiserver to authenticate to kubelets (run on any secure machine, then copy to each control plane node):
  1. On every control plane node, back up the existing API server manifest:
  1. On every control plane node, edit the API server static pod manifest to add the kubelet client certificate and key flags (this edit will cause the kube-apiserver static pod to restart):
Confirm the resulting kube-apiserver.yaml includes:
  1. Ensure file permissions on the certificate and key are appropriately restricted on every control plane node:
  1. Wait for the kube-apiserver static pod to be recreated and become Ready (run on any machine with kubectl configured):
Do not proceed until all kube-apiserver pods show STATUS as Running and READY as 1/1.
  1. Verify on every control plane node that the kube-apiserver process is now running with the required flags:
Confirm the output includes both --kubelet-client-certificate=/etc/kubernetes/pki/kubelet-client.crt and --kubelet-client-key=/etc/kubernetes/pki/kubelet-client.key.
kubectl cannot modify the API server’s host-level configuration or the static pod manifest at /etc/kubernetes/manifests/kube-apiserver.yaml on control plane nodes. To remediate this finding, you must edit that file directly on every control plane node; see the Manual Steps section for the exact procedure.