January 2019
Intermediate to advanced
484 pages
11h 48m
English
At times we'll need to initialize our application before it actually runs, such as by preparing schema for the main application or loading data from another place. As it's difficult to predict how long the initialization could take, we can't simply rely on initialDelaySeconds to create a buffer for this preparation, so init containers come in handy here.
init containers are one or more containers that start prior to application containers and run one by one to completion in order. If any container fails, it's subject to the restartPolicy of a pod and starts over again until all containers are exited with code 0. Defining init containers is similar to defining regular containers:
...spec: containers: - name: my-app image: <my-app> ...
Read now
Unlock full access