kubectl wait sometimes timed out unexpectedly

▼魔方 西西 提交于 2020-07-08 03:41:26

问题


I just add kubectl wait --for=condition=ready pod -l app=appname --timeout=30s in the last step of BitBucket Pipeline to report any deployment failure if the new pod somehow producing error.

I realize that the wait doesn't really consistent. Sometimes it gets timed out even if new pod from new image doesn't producing any error, pod turn to ready state.

Try to always change deployment.yaml or push newer image everytime to test this, the result is inconsistent.

BTW, I believe using kubectl rollout status doesn't suitable, I think because it just return after the deployment done without waiting for pod ready.

Note that there is not much difference if I change timeout from 30s to 5m since apply or rollout restart is quite instant.

  • kubectl version: 1.17
  • AWS EKS: latest 1.16

来源:https://stackoverflow.com/questions/62726150/kubectl-wait-sometimes-timed-out-unexpectedly

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!