-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
CoreV1().Pods.List and pod.Status.Phase == apiv1.PodRunning is not a good way to test if pods are Running #815
Comments
BUMP |
Yeah had to see the Status from Condition in PodStatus struct. IsPodReady function is also there which can be used https://godoc.org/k8s.io/kubernetes/pkg/api/v1/pod didn't use it though. |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Rotten issues close after 30d of inactivity. Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
@fejta-bot: Closing this issue. 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/test-infra repository. |
…ods are Running See kubernetes/client-go#815 Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
…ods are Running See kubernetes/client-go#815 Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
…ods are Running See kubernetes/client-go#815 Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
…ods are Running See kubernetes/client-go#815 Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
…ods are Running See kubernetes/client-go#815 Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
…ods are Running (#2523) See kubernetes/client-go#815 Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
…ods are Running See kubernetes/client-go#815 Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
…ods are Running See kubernetes/client-go#815 Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
…ods are Running See kubernetes/client-go#815 Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
…ods are Running (#2544) See kubernetes/client-go#815 Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> Co-authored-by: Pierangelo Di Pilato <pierdipi@redhat.com>
…ods are Running (#2543) See kubernetes/client-go#815 Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> Co-authored-by: Pierangelo Di Pilato <pierdipi@redhat.com>
…ods are Running (#383) See kubernetes/client-go#815 Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
…ods are Running (#2545) See kubernetes/client-go#815 Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> Co-authored-by: Pierangelo Di Pilato <pierdipi@redhat.com>
Hello guys
What is my k8s client-go version? Latest but this is my go.sum:
k8s.io/client-go v0.0.0-20200307122516-5194bac86967
k8s.io/client-go v0.0.0-20200307122516-5194bac86967/go.mod
k8s.io/client-go v0.17.0
k8s.io/client-go v0.17.0/go.mod
k8s.io/client-go v11.0.0+incompatible
k8s.io/client-go v11.0.0+incompatible/go.mod
I am using this library to deploy Docker containers on Amazon and after the deployment is done, i check the status of the pods with: pod.Status.Phase == apiv1.PodRunning.
However, looking at all the possible states (https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/), it seems none is good enough to test the pod is healthy and running. Running only means the Container has been started or is starting but i noticed that sometimes the check succeeds but then the pod is stuck on CrashLoopBackOff.
Any ideas on how to wait for all the containers to be in a Running state? Succeeded does not work for me because i expect the container to keep running.
Best regards and thank you
PS: Let me know if you need more information regarding versions. I assume the problem is generic enough.
The text was updated successfully, but these errors were encountered: