Skip to content

Instantly share code, notes, and snippets.

@elsonrodriguez
Created February 2, 2021 17:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save elsonrodriguez/0e7b1c62e76f8936b41649499f93fb16 to your computer and use it in GitHub Desktop.
Save elsonrodriguez/0e7b1c62e76f8936b41649499f93fb16 to your computer and use it in GitHub Desktop.
test livemigration impact on gke
for node in $(kubectl get pod -l app=foo -o jsonpath='{range .items[*]}{.spec.nodeName}{"\n"}{end}' | sort -n | uniq); do zone=$(kubectl get node $node -o jsonpath="{.items[0]}{.metadata.labels.topology\.kubernetes\.io/zone}"); gcloud compute instances simulate-maintenance-event $node --zone=$zone --async ; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment