Created
December 5, 2015 01:06
-
-
Save ethernetdan/fd5e335ead8706284a6d to your computer and use it in GitHub Desktop.
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
function getRCPods() { | |
ARGS=$2 | |
selector=$(kubectl get rc/$1 --template='{{range $k, $v := .spec.selector}}{{printf "%s=%s" $k $v}}{{end}}' $ARGS) | |
kubectl get pods --selector="$selector" --template='{{range .items}}{{printf "%s\n" .metadata.name}}{{end}}' $ARGS | |
} | |
alias pods=getRCPods |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment