I am evaluating Kubernetes for adhoc task queueing / execution and have one 
(final?) scenario that I need to resolve for my justification to the product 
management team.  The general system is this: users have a set of tools which 
they can use to perform analysis or parsing on files.  Each tool is wrapped in 
a Docker container and the user selects the tool to use and provides the source 
file via a web interface as a job submission.  The web service will then submit 
the job to the cluster for execution.  Some jobs will complete in one or two 
minutes while others will run for hours before completion.  There could be tens 
or hundreds of jobs requested for processing simultaneously.

There is a user requirement to be able to set priorities on jobs to elevate one 
job's priority over another.  Ideally I'd like to implement this one of two 
ways: 

1 - Allow the submitting user to set a priority that will allow the job to land 
at the head of the queue but does not preempt any existing job.  Preemption / 
termination of running jobs is something that only an administrator is allowed 
to do.  Is it possible to set priority in the queue without preemption?

2 - Use Kubernetes priority / preemption as it stands now but use the preStop 
hook to determine the source or reason for the Stop (e.g job was preempted) and 
automatically resubmit the job back into the queue.  Is there some sort of flag 
available on the Job in the preStop hook to inform me that the job was 
preempted (vs any other termination type / reason) so that I can automatically 
resubmit it?

If neither of these options is viable does anyone have a recommendation for how 
to handle this with Kubernetes?

Regards,
Frank

-- 
You received this message because you are subscribed to the Google Groups 
"Kubernetes user discussion and Q&A" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to kubernetes-users+unsubscr...@googlegroups.com.
To post to this group, send email to kubernetes-users@googlegroups.com.
Visit this group at https://groups.google.com/group/kubernetes-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to