What happened:
I am using kube_cronjob_status_active to monitor my cronjob, it runs every 5 minutes.
In the given time window, kube_cronjob_status_active{cronjob=my-job} shows that there is no active cronjob running:
However if I check kube_job_status_start_time{job_name=my-job*} (my-job is a cronjob, every job instance has name like my-job-12345678) within same time window, it shows that there are jobs scheduled to run approximately every 5 minutes:
What you expected to happen:
I would like to see that the kube_cronjob_status_active matches kube_job_status_start_time.
How to reproduce it (as minimally and precisely as possible):
It is running in our internal k8s cluster so I don't know how to let others repo it, but I am happy to provide as much information as needed.
# An example: https://github.com/kubernetes/kube-state-metrics/issues/2223#issuecomment-1792850276
minikube start
...
go run main.go --custom-resource-state-only --custom-resource-state-config-file ksm-2223/custom-resource-config-file.yaml --kubeconfig ~/.kube/config
What happened: I am using
kube_cronjob_status_active
to monitor my cronjob, it runs every 5 minutes. In the given time window,kube_cronjob_status_active{cronjob=my-job}
shows that there is no active cronjob running:However if I check
kube_job_status_start_time{job_name=my-job*}
(my-job
is a cronjob, every job instance has name likemy-job-12345678
) within same time window, it shows that there are jobs scheduled to run approximately every 5 minutes:What you expected to happen: I would like to see that the
kube_cronjob_status_active
matcheskube_job_status_start_time
.How to reproduce it (as minimally and precisely as possible): It is running in our internal k8s cluster so I don't know how to let others repo it, but I am happy to provide as much information as needed.
Anything else we need to know?:
Environment: AWS EKS
kubectl version
):