<p>I want to schedule three sequential tasks using Kubernetes. these three tasks are:</p>

<p>1- download a file from a URL</p>

<p>2- process the file</p>

<p>3- Put the file in a web server (The server must be configured and some modules must be installed on it first)</p>

<p>I think I can do this using <a href="https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/" rel="nofollow noreferrer">Kubernetes jobs</a>, but I did not find an example of doing such tasks. </p>

<p>In Addition, I do not know how to first configure the web server before using it. Is it possible to create a Docker image from the server, configure it and finally get a snapshot from it?</p>

<p>EDIT:
As the first step, I just want to create a job for downloading a file. I could not find any sample for that; how can I do that?</p>

sajad
<p>For my opinion the most efficient and great solution nowadays is still use <a href="https://kubernetes.io/docs/concepts/workloads/pods/init-containers/#init-containers-in-use" rel="nofollow noreferrer">initContainers</a>. </p>

<p>InitContainers is the best tool to handle your task in current situation.
Use <a href="https://stackoverflow.com/a/46880653/9929015">example provided here</a> and implement all your tasks as initContainers. </p>

<p>About configuring web-server and further container usage:
There are a lot of articles that provide step-by-step instruction on how to create own Docker image.
I can recommend you use as an example <a href="https://medium.com/@vi1996ash/steps-to-build-apache-web-server-docker-image-1a2f21504a8e" rel="nofollow noreferrer">Steps To Build Apache Web Server Docker Image</a> article. </p>
