Why doesn't the Kubernetes dashboard display utilization graphs?

When you access the Kubernetes dashboard, utilization graphs don't display.

Sometimes after a cluster update or worker node reboot, the kubernetes-dashboard pod does not update, or the metrics-server is not running properly.

Follow these steps to resolve the issue:

  1. Verify that the metrics-server is running in your cluster.
    kubectl get deployment metrics-server -n kube-system
    
  2. If the metrics-server is not running or is in a failed state, check the pod logs.
    kubectl logs -n kube-system -l k8s-app=metrics-server
    
  3. Delete the kubernetes-dashboard pod to force a restart. The pod is re-created with RBAC policies to access the metrics-server for utilization information.
    kubectl delete pod -n kube-system $(kubectl get pod -n kube-system --selector=k8s-app=kubernetes-dashboard -o jsonpath='{.items..metadata.name}')
    
  4. If the issue persists, restart the metrics-server deployment.
    kubectl rollout restart deployment metrics-server -n kube-system