Managing CronJobs List
- List all CronJobs in the current namespace:
kubectl get cronjobs
This will display a list of all CronJobs in the namespace you are currently working in.
- List CronJobs in a specific namespace:
kubectl get cronjobs -n <namespace>
Replace <namespace>
with the name of the namespace.
- View detailed information about a specific CronJob:
kubectl describe cronjob <cronjob-name>
This provides detailed information about the specified CronJob, including its schedule, concurrency policy, and job history.
- List all CronJobs across all namespaces:
kubectl get cronjobs --all-namespaces
- Patch CronJob to Update Image:
kubectl set image cronjob/<cronjob-name> <cronjob-name>=<image>:<new-tag>
- Look for the created Job and Pod associated with the CronJob:
kubectl get jobs -n <your-namespace>
kubectl get pods -n <your-namespace> --selector=job-name=<job-name>
No Comments