Skip to content

Instantly share code, notes, and snippets.

@knil-sama
Last active July 15, 2019 10:31
Show Gist options
  • Save knil-sama/ff3f3c2f4541dd866810f0e9bc0adfe6 to your computer and use it in GitHub Desktop.
Save knil-sama/ff3f3c2f4541dd866810f0e9bc0adfe6 to your computer and use it in GitHub Desktop.
Create duplicated cronjob in the same namespace
kubectl get cronjob <cronjob-name> -o json > /tmp/<cronjob-name>.json && sed -i 's/<cronjob-name>/<cronjob-name>-duplicate/' /tmp/<cronjob-name>.json && kubectl create -f /tmp/<cronjob-name>.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment