Skip to content

Instantly share code, notes, and snippets.

@SkamDart
Created November 2, 2018 19:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SkamDart/e3b1e9b268990ace0d6fce59c869fb9d to your computer and use it in GitHub Desktop.
Save SkamDart/e3b1e9b268990ace0d6fce59c869fb9d to your computer and use it in GitHub Desktop.
shell image tag match
#
kubectl get cronjobs | awk '{print $1}' | xargs kubectl describe cronjob | grep 'IMAGE_TAG'
# count number of cronjobs with provided IMAGE_TAG
kubectl get cronjobs | awk '{print $1}' | xargs kubectl describe cronjob | grep 'IMAGE_TAG' | wc -l
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment