Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for CronJob #32

Open
edhedges opened this issue Apr 9, 2019 · 2 comments
Open

Add support for CronJob #32

edhedges opened this issue Apr 9, 2019 · 2 comments

Comments

@edhedges
Copy link

edhedges commented Apr 9, 2019

I'm new to Kubernetes and kail and recently setup a CronJob, following the docs here: https://kubernetes.io/docs/tasks/job/automated-tasks-with-cron-jobs/

I was trying to use kail to stream the logs, but it doesn't look like it's supported at this time. Would it be possible to allow for commands structured like kail -n staging -j daily-job where -j is the job name, which can be retrieved via kubectl -n staging get jobs. Ideally, we wouldn't have to supply the numeric suffix, because especially for jobs that run often, it will be super dynamic.

@edhedges
Copy link
Author

edhedges commented Apr 9, 2019

Update:

A couple of "workarounds" I've found, which seem like better solutions anyway now (feel free to close issue) are:

kail -n staging -c daily-job-container

or using a label:

kail -n staging -l 'app=daily-job'

@TimShilov
Copy link

I'm also looking for this feature. The above "workarounds" are great but unfortunately do not work for me as they require pods to actually have a unique label or container name. In my case, I have 20+ CronJobs and they don't have labels or unique container names so it's hard to watch logs.
At the moment I'm using k9s for that but it's heavier and its logs viewer is worse (sometimes just doesn't show anything or stops streaming when deployment is rolling updated).

Having --cronjob <name> as an option would be very useful!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants