We are having a Kubernetes cluster and using Prometheus + Grafana for monitoring and alerting. We need to show a panel on Grafana that shows us the view (same as kubectl get namespaces) . Currently we are able to get name and status column using the below PROMQL along with Hide options in Visualization section of Grafana.
count(kube_namespace_status_phase) by (phase, namespace)
But we also want to find the AGE from when a namespace was active/created. We are not able to find AGE in any of the 4 kube metrics of namespace available -
- kube_namespace_created
- kube_namespace_status_phase
- kube_namespace_lables
- kube_namespace_annotations
Any suggestions would be helpful.