Skip to main content

More Info:

Use https for kubelet connections.

Risk Level

High

Address

Security

Compliance Standards

  • CIS Kubernetes

Triage and Remediation

Remediation

Manual Steps

  1. SSH to each control plane node
  2. Backup the API server static pod manifest
  3. Edit the manifest to remove the --kubelet-https argument
    Open the file in an editor on the control plane node:
    In the command: or args: list for kube-apiserver, delete the entire line containing:
    or
    (Remove the flag completely, do not re-add it with another value.)
    Save and exit the editor.
    Note: Editing this file will cause the kube-apiserver static pod to be restarted by kubelet.
  4. Wait for the kube-apiserver pod to restart and become Running
    From any machine with kubectl access:
    Repeat until the kube-apiserver-<node-name> pod is in Running and READY status.
  5. Verify the kube-apiserver is no longer started with --kubelet-https
    On the same control plane node:
    Confirm that in the printed command line there is no --kubelet-https= argument present.
kubectl cannot change the kube-apiserver static pod manifest or its process flags, so this finding cannot be remediated via the Kubernetes API. To fix it, you must edit /etc/kubernetes/manifests/kube-apiserver.yaml directly on every control plane node as described in the Manual Steps section.

Additional Reading: