Grafana dashboard for Kubernetes with separate simple view for each pod and their resource limits

9/17/2019

I want to know if there is any ready to use OR how I can create a grafana dashboard with below specifications:

I want a dashboard that shows each pod as a cube or circle or any shape. If the pod is using like 80% of its resource limit (cpu/memory) the color of that shape changes from green to red.

I have to mention that I have a Prometheus + grafana in place and I am using them and I just need to know how to create such a dashboard.

-- AVarf
grafana
kubernetes
prometheus

2 Answers

9/17/2019

I installed the steps, hope can help you. kubernetes_prometheus_monitor

if you just monitoring pod, simple with cadvisor

linux工匠之docker和kubernetes的监控(cadvisor+prometheus)

-- bbotte
Source: StackOverflow

9/17/2019

Grafana includes a panel type called Single Stat Panel which should do what you need. It can be set to change background or text colour based on thresholds you determine, so if you have an output metric which is a percentage, you can specify what percentage to change at. It does 2 stage changes, so you can use traffic lights to indicate a warning before a metric gets to emergency levels.

If you have multiple similar metrics you want to create panels for, you can use Grafana's templating variables to get a list of unique pod identifiers (depending on what labels are available to you), and then use the repeat panel option to automatically create one panel per pod. WARNING: if you have a huge number of pods, this option could stall or crash your browser! If you think this will be a problem then I recommend making one dashboard with all the metrics for a single pod, and using a variable to switch between them.

-- Shevaun Frazier
Source: StackOverflow