How to Create a Grafana Dashboard which can show metrics of the pods in that deployment based on labels

Hi All,

I am trying to create a Grafana Dashboard with the below features.
Datasource: Prometheus
Metrics: CPU and Memory
The label that is associated with the Kubernetes deployment and based on the label the dashboard is to be created.

Eg: a nginx deployemnt with a label of “app: nginx-test” , with this filter nginx-test we we will be able to see that pods CPU and memory that are associated with the label.

Do we have to add additional scrape configuration to scrape deployment labels?

Thanks and Regrards,