Skip to content

Instantly share code, notes, and snippets.

@elsonrodriguez
Created August 14, 2015 05:29
Show Gist options
  • Save elsonrodriguez/9685920b3349d1646b5b to your computer and use it in GitHub Desktop.
Save elsonrodriguez/9685920b3349d1646b5b to your computer and use it in GitHub Desktop.
Kubernetes rolling update, in style! With tmux and teamocil (https://github.com/remiprev/teamocil )
windows:
- name: kube-rolling
root: ~/
layout: main-horizontal
panes:
- commands:
- export update_command="kubectl rolling-update <rc-name> --update-period=1s --image=<image_url>"
- clear
- read -p "$update_command"
- $update_command
- watch -n 1 kubectl get pods
- commands:
- export lbip=`kubectl get services -l "name=<rc-name>" -o template --template="{{with index .items 0}}{{.spec.clusterIP}}{{end}}"`
- watch -c -n 1 curl -i --silent $lbip:8080/
tmux new-session -d "teamocil kube-rolling" \; attach
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment