Forum archive › Kubernetes & Helm Charts
ArchiveError from server (ServiceUnavailable): the server is currently unable to handle the request (get pods.metrics.k8s.io)
Problem
User is trying to run the command
kubectl top pod --all-namespaces
or
kubectl top node --all-namespaces
and get the following error
Error from server (ServiceUnavailable): the server is currently unable to handle the request (get pods.metrics.k8s.io)
Solution
first make sure metrics-server is installed
kubectl get po -n kube-system |grep metrics
if not add metrics server
kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml
kubectl edit deployment.apps -n kube-system metrics-server
We do this for a living.
Kubernetes, DevOps and platform engineering, delivered in days — not another weekend lost to a stack trace.
Start a project →