OpenShift Init Container: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 14: Line 14:
An init container always runs to completion, and if more than one init containers are declared, each one must complete successfully before the next one is started.
An init container always runs to completion, and if more than one init containers are declared, each one must complete successfully before the next one is started.


If an init container fails, Kubernetes will restart the Pod repeatedly until the init container succeeds, unless the pod has a "restartPolicy" of "Never".
If an init container fails, Kubernetes will restart the Pod repeatedly until the init container succeeds, unless the pod has a "[[OpenShift_Pod_Definition#restartPolicy|restartPolicy]]" of "Never".

Revision as of 00:41, 28 February 2018

External

Internal

Overview

An init container is a specialized container that runs before the application containers, and can contain utilities or setup scripts not present in the application image. If a pod declares init containers, the application containers are only run after all init container complete successfully.

An init container always runs to completion, and if more than one init containers are declared, each one must complete successfully before the next one is started.

If an init container fails, Kubernetes will restart the Pod repeatedly until the init container succeeds, unless the pod has a "restartPolicy" of "Never".