Review kubelet serving certificate rotation

Renew kubelet serving certificates before expiry and issue them only to verified nodes.

Description

To renew kubelet’s HTTPS serving certificate automatically, enable RotateKubeletServerCertificate and set serverTLSBootstrap: true in a supported kubelet configuration. The client certificate kubelet presents to the API server rotates separately.

Potential impact

An expired serving certificate can interrupt node operations such as log retrieval. Issuing a certificate without validating the request can allow it to identify the wrong node.

Remediation

Kubernetes’ built-in approvers do not automatically approve kubelet serving certificate signing requests (CSRs). Use an external approver or a manual process to check the node identity and requested DNS names and IP addresses before approval and signing. Alert before expiry and confirm that kubelet presents the renewed certificate and the API server verifies it against a trusted CA.

Examples

The KubeletConfiguration excerpts only change the feature gate from false to true. Renewal also requires TLS bootstrapping and a working CSR approval and signing process.

Before

yaml
apiVersion: kubelet.config.k8s.io/v1beta1
kind: KubeletConfiguration
featureGates:
  RotateKubeletServerCertificate: false

After

yaml
apiVersion: kubelet.config.k8s.io/v1beta1
kind: KubeletConfiguration
featureGates:
  RotateKubeletServerCertificate: true

References