-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
client.CoreV1Api.read_namespaced_pod(pod_name, pod_namespace) returning incomplete data for several minutes after pod is deployed #2201
Comments
Hi, I guess it's due to the pod status is not |
/assign @showjason |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close not-planned |
@k8s-triage-robot: Closing this issue, marking it as "Not Planned". In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
client.CoreV1Api.read_namespaced_pod(pod_name, pod_namespace)
returns incomplete data for several minutes after pod is deployed if it is queried as soon as pod is deployed.A bit more detail ...
I am deploying a pod and then immediately using the
read_namespaced_pod
method to determine the pod IP. Here is an outline of the code I am running. pod_ip is set to None for several minutes after the pod is deployed, and well after I can query the pod IP usingkubectl describe pod <pod_name>
. Presumably the read_namespaced_pod is returning a cached result that contains incomplete data.pod = read_namespaced_pod(pod_name, pod_namespace)
pod_ip = pod.status.pod_ip
I've worked around this for now by inserting a 10s sleep after a pod is deployed before attempting to determine the pod_ip. That appears to be consistently working.
The text was updated successfully, but these errors were encountered: