Skip to main content
Metrics Server enables use of the Horizontal Pod Autoscaler and Vertical Pod Autoscaler. It does this by gathering metrics data from the kubelets in a cluster. By default, metrics-server can’t verify the certificates the kubelets present: metrics-server connects to each kubelet by IP address, but the kubelet’s default certificate doesn’t list an IP address among its valid names. You can solve this in two ways:
  • Skip certificate validation: Simpler to set up, but metrics-server no longer verifies it’s actually talking to the kubelet it thinks it is.
  • Rotate kubelet certificates: More setup, but metrics-server can verify them normally and certificate validation stays intact.

Option 1: Skip certificate validation

Metrics Server’s own documentation describes --kubelet-insecure-tls as “for testing purposes only.” This disables certificate verification between metrics-server and every kubelet in your cluster. Use Option 2 for anything production.
Step 1: Download the upstream metrics-server manifest:
Step 2: Edit components.yaml and add --kubelet-insecure-tls alongside the existing args in the metrics-server container spec. Step 3: Apply it:

Option 2: Rotate kubelet certificates

This keeps certificate validation intact by requesting kubelet certificates that include the node’s IP address, instead of telling metrics-server to stop checking. Step 1: Apply the following Machine Config snippet to all nodes, to enable kubelet certificate rotation:
On Talos versions 1.13 and earlier, use the older deprecated configuration field:
An older form of this setting, machine.kubelet.extraArgs.rotate-server-certificates: true, still works but is deprecated by the kubelet in favor of the config-file field shown above.
Step 2: Install the Kubelet Serving Certificate Approver — which automatically approves the Certificate Signing Requests the kubelets generate — along with metrics-server itself.
Add the following snippet to the Cluster Config of the node that will be handling the bootstrap process, so both are installed automatically as part of bootstrap:
On Talos versions 1.13 and earlier, use the deprecated cluster.extraManifests field instead — see inlineManifests and extraManifests for the older format.

Verify metrics-server is working

Whichever option you chose, confirm metrics-server is running and actually returning data:
kubectl top nodes should return CPU and memory usage for each node. If it returns an error instead, metrics-server is running but can’t reach or verify the kubelets, revisit whichever option you configured above. If you’ve just switched from Option 1 to Option 2, or redeployed metrics-server for any other reason, check the pod count before trusting a working result:
A rolling update doesn’t remove the previous pod until the new one passes its readiness check. If the new pod doesn’t become ready, the old pod can keep serving traffic — including a kubectl top nodes that still returns data — even though the configuration you just applied isn’t the one actually running.