Daily Archives: 12.04.2019
Kubernetes’ cronjobs
That’s what it is — https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/ Get all cronjobs in env:
1 |
kubectl --kubeconfig ... --namespace platform -o wide get cronjobs |
Get info on exact cronjob:
1 |
kubectl --kubeconfig ... --namespace platform describe cronjob/smartrouting-cron-import-from-bi |
Get pods with this cronjob:
1 |
kubectl --kubeconfig ... --namespace platform -o wide get pods|grep "rou" |
Get logs of cronjob
1 |
kubectl --kubeconfig ... --namespace platform logs smartrouting-cron-import-from-bi-1555060200-dqg5j |
you can add -f for live updating logs and -p for watching logs of previous pod.