Problem scenario
You run "kubectl top pod" but you receive an error such as this:
'Metrics not available or pod default/kubia-xxx-bmb, age: 1hr10m... error: Metrics not available for pod default/kubia-xxx-bmb, age: 1hr10m"'
What should you do?
Updated on 9/2/19.
Solution
Wait five minutes. Then re-run this command: kubectl top pod
The source of this question and answer were taken from page 432 of Kubernetes in Action by Marko Luksa published in 2018 by Manning. For issues about metrics on pods, you may want to consider Prometheus or Datadog.
To learn more about Kubernetes in general, you may want to consider purchasing a book. Kubernetes is arguably the most in-demand skill with the greatest potential growth.