diff --git a/zsh/zshrc.d/40_functions.sh b/zsh/zshrc.d/40_functions.sh index 0642216..5bfb86c 100644 --- a/zsh/zshrc.d/40_functions.sh +++ b/zsh/zshrc.d/40_functions.sh @@ -208,5 +208,9 @@ tmp() { } kubectl_pod() { - kubectl get pods --field-selector=status.phase=Running --selector=${1} -o jsonpath='{.items[*].metadata.name}' + kubectl get -n "${1}" pods --field-selector=status.phase=Running --selector=${2} -o jsonpath='{.items[*].metadata.name}' +} + +kubectl_deployment() { + kubectl get -n "${1}" deployment --selector=${2} -o jsonpath='{.items[*].metadata.name}' }