Created
August 11, 2019 13:55
-
-
Save hoop33/78603e34a0dafb724ded0154055ce6ef to your computer and use it in GitHub Desktop.
OpenShift: zsh function that uses fzf and oc to rsh into a pod
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 ocsh() { | |
local pods pod | |
pods=$(oc get pods | cut -d' ' -f 1 | sed '1d' | grep -v '\-build' | grep -v '\-deploy') && | |
pod=$(echo "$pods" | fzf +m) && | |
oc rsh $(echo "$pod") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment