I’m trying to understand the difference between these two queries:
changes(kube_pod_status_ready{condition="true",..}[10m])
and
changes(kube_pod_status_ready{condition="false",..}[10m])
is the changes()
function measuring the change from ready to non-ready? If so, obviously I’m having a hard time understanding the difference. My guess is that true measures changes in pods that are ready, false measures changes in pods that are not. But then the question is, what are those changes and at what point in the pod lifecycle are they ticked?
First Query : keeps track of how many times a pod moves from not ready to ready within the 10 minute period. It specifically focuses on pods getting ready to handle requests.
Second query monitors how many times a pod shifts from ready to not ready during the same 10 minute timeframe. It is concerned with pods becoming unavailable to handle requests.
In summary the first query looks at the number of pods getting ready while the second one examines the number of pods becoming unavailable. These queries can be valuable, for assessing the health and stability of your Kubernetes cluster. For instance a spike in changes found in the second query could suggest an issue with your pods or deployments.
SPC0nline is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.