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.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store