I want to count k8s cluster cpu/memory usage (not k8s pod usage) with prometheus, so that i can show in grafana.
I use sum (container_memory_usage_bytes{id="/"}) to get k8s cluster used memory, and topk(1, sum(kube_node_status_capacity_memory_bytes) by (instance)) to get whole k8s cluster memory, but they can not divide since topk function does not return value but vector.
How can i do this?