Created
October 23, 2018 13:18
-
-
Save knil-sama/8ca406e966510b2b71b4124a31520b3e to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| cronjob_log() { | |
| echo $(kubectl get pods --selector=job-name="${1}" --output=jsonpath={.items..metadata.name}) | |
| } | |
| job_log() { | |
| echo $( kubectl get job | grep "${1}" | tail -n 1 | cut -d" " -f 1 | xargs kubectl describe job | grep SuccessfulCreate | tr -s ' ' | cut -d" " -f 8 | xargs kubectl logs) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment