I’m developing an application which uses kubernetes API to create Job and get Pod statuses through kubernetes Java client.
To design the application, I need to confirm that there is consistency between a Job and a Pod which is managed by the Job.
When I get the list of Pods after receiving the response of Job creation request, are the Pods created by the Job always included in the list?
The API I’m using to create Job is: /apis/batch/v1/namespaces/{namespace}/jobs
And to get Pods list: /api/v1/namespaces/{namespace}/pods
I’m worried that there might be a time lag between the response to the Job creation and the Pod generated by the Job appearing in the Pod list.
Cluster information:
Kubernetes version: 1.22.1
Cloud being used: bare-metal
Installation method: kubeadm
Host OS: CentOS 7.6
CNI and version: flannel 0.14.0
CRI and version: docker-ce 20.10.8