Relative Content

Tag Archive for kuberneteskubernetes-cronjob

kubernetes job to retrieve kubectl events periodically and store them

I’m trying to have a scheduled job in kubernetes to pull the events from the namespace and stream them to logging application. We use splunk for log management and all the job/pod logs are automatically forwarded to the splunk. So, I just need to run ‘kubectl get events -n ‘ to get the events. We are going to run this job within our k8s namespace.

Pod is hanging in terminating state

I have kubernetes CRON job that invokes simple script that is cloning git repository to persistent storage. Job is invoked every 15 minutes and once per day or two I have job that is not finishing and it has status ‘Terminating’.

how to kill/timeout a long running cronjob pod in kubernetes

Is there a way to kill a long running cronjob in kubernetes? Basically, I have created a CronJob in kubernetes. It is running a time consuming operation. I would like to put a limit on it. So, the pod associated with this cronjon should be killed/deleted automatically; if it doesn’t finish up with in a specific time period say, 5 minutes.