Skip to content

Instantly share code, notes, and snippets.

@arjun921
Last active February 5, 2020 08:42
Show Gist options
  • Save arjun921/f1cb0e87767e2ddbe7af7938829ced9b to your computer and use it in GitHub Desktop.
Save arjun921/f1cb0e87767e2ddbe7af7938829ced9b to your computer and use it in GitHub Desktop.
Await kubernetes pod status==Completed
#!/bin/bash
while [[ $(kubectl get pods $pod_name -o json | jq -r .status.containerStatuses[0].state.terminated.reason) != "Completed" ]]; do
echo "waiting for pod to finish docker build and push" && sleep 5
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment