DEV Community

Discussion on: Understanding Kubernetes: part 1 – Pods

Collapse
 
aurelievache profile image
Aurélie Vache

Hi and thank Mohamed
Pods are mortal by design, ther are not supposed to live forever :-)
For your need, you can use Jobs, as you already used it.
Have you defined a good activeDeadlineSeconds parameter in jobs spec?

"The activeDeadlineSeconds applies to the duration of the job, no matter how many Pods are created. Once a Job reaches activeDeadlineSeconds, all of its running Pods are terminated and the Job status will become type: Failed with reason: DeadlineExceeded."
So you can increate it for your needs for example, and also run several pods in parallel in order to parallelize your job

Collapse
 
abdellani profile image
Mohamed ABDELLANI

Thank you @aurelievache

Does this mean that I should never deploy a queuing system like rabbitmq as a pod?

In my case, the queuing system is very active in the application. All other pods rely on it. if the queuing system pod fails, I'll need to waste time before I can resume the process.