Skip to content

Instantly share code, notes, and snippets.

Created Sep 12, 2019
What would you like to do?
run a command on kubernetes pod by deployment name
k8exec() {
local pod=$1
kubectl exec -it $(kubectl get pods -o name | grep -m1 $pod | cut -d'/' -f 2) -- $@
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment