Learn Kubernetes: Using an init-container
In this series of stories, you will learn how to use Kubernetes. Today, let’s see how to create and use an init-container.
The init
containers allow to prepare a container running in a pod, for example to wait for a service to be available. The main container is not executed until the preparation is complete.
Create a deployment resource file :
- of an `init` container that writes a message to the
/ic/this
file, - a main container that reads this file.