Skip to content

Instantly share code, notes, and snippets.

@fungusakafungus
Last active July 27, 2018 07:56
Show Gist options
  • Save fungusakafungus/466d9448feddf0617c28fa560317dd7b to your computer and use it in GitHub Desktop.
Save fungusakafungus/466d9448feddf0617c28fa560317dd7b to your computer and use it in GitHub Desktop.
Wait for kubernetes pods to reach running state
```
$ kubectl run --image nginx nginx ; while kubectl get pod --no-headers | grep -v Running ; do sleep 2; done
deployment "nginx" created
nginx-701339712-wpg0v 0/1 ContainerCreating 0 0s
nginx-701339712-wpg0v 0/1 ContainerCreating 0 2s
nginx-701339712-wpg0v 0/1 ContainerCreating 0 4s
nginx-701339712-wpg0v 0/1 ContainerCreating 0 6s
nginx-701339712-wpg0v 0/1 ContainerCreating 0 8s
nginx-701339712-wpg0v 0/1 ContainerCreating 0 10s
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment