Advertisement
Guest User

Untitled

a guest
May 23rd, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. # run a bash function with the timeout command
  2.  
  3. ```
  4. function my_function {
  5. until kubectl get -n kube-system deploy/my_dep ; do
  6. echo "Wait my_dep deployment ..."
  7. sleep 5
  8. done
  9.  
  10. # Do someting
  11.  
  12. }
  13.  
  14. export -f my_function
  15. timeout 20s bash -c my_function
  16. ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement