<p>I built a promethues for my kubernetes, and it works well now. It can get node and container/pod cpu, memory data, but I don't know how to get the kubernetes CPU Usage in promethues. Because in my application, if pod restart, deployment will not get data before.</p>

edselwang
<p>A deployment is only an abstraction within the Kubernetes control plane, the things actually using CPU will all be pods. So you can use something like this <code>container_cpu_usage_seconds_total{namespace="mynamespace", pod_name=~"mydeployment-.*"}</code>.</p>
