Skip to content

Instantly share code, notes, and snippets.

@martinkennelly
Created January 30, 2023 13:27
Show Gist options
  • Save martinkennelly/a4e9dfe5657bcf6479d2c9b5194ffc3f to your computer and use it in GitHub Desktop.
Save martinkennelly/a4e9dfe5657bcf6479d2c9b5194ffc3f to your computer and use it in GitHub Desktop.
Get OVN-Kubernetes master container leader
for f in $(oc -n openshift-ovn-kubernetes get pods -l app=ovnkube-master -o jsonpath={.items[*].metadata.name}) ; do echo -e "\n${f}\n" ; oc -n openshift-ovn-kubernetes exec "${f}" -c northd -- ovs-appctl -t /var/run/ovn/ovnnb_db.ctl cluster/status OVN_Northbound |grep Role ; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment