I am trying to use the following query: kube_pod_container_status_ready{namespace="$namespace",pod="$pod",container="$container"}
but not sure of how to set the container variable in grafana. Need help in this one.
Go to explore -> metric browser
In Select labels to search in
select containter
and then select any value.
After that, metrics on the left should be updated to include only metrics that have container
label.
In my case it will be for example: kube_pod_container_info
It your case, if kube_pod_container_status_ready
has container
label, you could use it.
Then, add variable with query:
label_values(kube_pod_container_info, container)
/ label_values(kube_pod_container_status_ready, container)