This is the era of containerization and orchestration where majority of the application are following the trend of running on a container which are further deployed in a Kubernetes cluster. It’s sometimes necessary to prepare the main container which will be running our application or the main logic.
There can also be situations where we need to execute a particular utilities or setup scripts that are not present in our main image ( as it would make it heavy and we only need it once in the beginning ).
Kubernetes provides special type of containers that runs to completion before the main app's container and Kubernetes will repeatedly restarts the Pod until the init container succeeds. Some of its properties are :