-2

In a retry/backoff loop, I check, using https://pkg.go.dev/k8s.io/api/apps/v1#Deployment:

ready := client.AppsV1().Deployments(f.Namespace).Get(context.TODO(), dep.GetName(), metav1.GetOptions{}).Status.ReadyReplicas

ready comes back as 0 for about five minutes before the retry times out and the test fails. During that time, if I run kubectl -n myNamespace get deploy myDeploy -o yaml | yq .status.ReadyReplicas, it returns 1 as soon as the deployment exists and continues to return 1 the entire time.

Can anybody explain the discrepancy? The cluster matches, the namespace matches, the deployment name matches.

Thanks for your time!

EDIT: Appreciate the downvotes with zero comments. I was hoping I'd at least get a "here's why your question is wrong" but SO continues to outdo itself.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.