Skip to content

Instantly share code, notes, and snippets.

@skymoore
Created July 9, 2022 04:13
Show Gist options
  • Save skymoore/acf9e878f300d869a720d5968a0ba119 to your computer and use it in GitHub Desktop.
Save skymoore/acf9e878f300d869a720d5968a0ba119 to your computer and use it in GitHub Desktop.
test hello world kubernetes cron job
#!/bin/bash
kubectl create job --from=cronjob/my-cron-job test-my-cron-job
kubectl wait --for=condition=complete --timeout=10s job/test-my-cron-job
echo "my-cron-job output:"
kubectl logs job/test-my-cron-job
kubectl delete job test-my-cron-job
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment