How To Resolve the 'cannot get the kubernetes node metrics from the K8s master' Error
  • 07 Mar 2025
  • 1 Minute to read
  • Contributors
  • Dark
    Light

How To Resolve the 'cannot get the kubernetes node metrics from the K8s master' Error

  • Dark
    Light

Article summary

Background

The RealTheory collector requires the Metrics Server to be installed on the Kubernetes cluster. The Metrics Server is automatically installed with some managed versions of Kubernetes. The following table indicates which managed Kubernetes offerings include the Metrics Server as part of the standard offering:

Managed Kubernetes OfferingIncludes Metrics ServerMore information
AKSYes
GKEYes
EKSNoHow to install the Metrics Server on EKS

If the Metrics Server is not installed on a cluster where the RealTheory collector is installed, the collector will try to process the node metrics, but the data will not be available.

Solution

  1. Check the RealTheory collector logs:

    1. Run the following command to identify the pod name:

      kubectl \-n real-theory-system get pods

    2. Run the following command to get the RealTheory collector logs:

      kubectl \-n real-theory-system logs \<pod-name\>

      where \<pod-name\> is the name of the pod identified in Step 1a.

  2. Review the logs for a message that is similar to the following:

    ERROR: 2025/02/26 22:20:14.479626 utils.go:152: cannot get the kubernetes node metrics from the K8s master: the server is currently unable to handle the request (get [nodes.metrics.k8s.io](http://nodes.metrics.k8s.io/))  
    ERROR: 2025/02/26 22:20:14.479626 monitor.go:112: unable to get the nodes from the k8s control plane: cannot get the kubernetes node metrics from the K8s master: cannot get the kubernetes node metrics from the K8s master: the server is currently unable to handle the request (get [nodes.metrics.k8s.io](http://nodes.metrics.k8s.io/)) 
    
  3. If the log contains this message, install the metrics server on the associated cluster.


Was this article helpful?