Last active
October 26, 2018 02:27
-
-
Save joerx/25391497674f822fb4637d8587bd0f39 to your computer and use it in GitHub Desktop.
Get k8s masters from node list, output name
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kubectl get node -o json | jq -r '.items[] | select(.metadata.labels["kubernetes.io/role"] == "master") | .metadata.name' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment