The init containers option is available in Kubernetes environments used to run additional containers at startup that helps initialize an application. Once the init containers have completed their initialization tasks, they terminate but leave the application container(s) running. For the App Server Agent installation, init containers are used as a delivery mechanism to copy the agent files into the application container at deploy time. See Init Containers Option in Kubernetes.
Copying the agent files at deploy time (instead of at build time) provides advantages over explicitly copying the agent files and dependencies into the application image. The init containers option simplifies the image build process because:
You do not need to update each application's Dockerfile to copy the agent files.
You do not need to rebuild the application image for agent upgrades.
See the language-specific container installation page for how to use an init container:
In the Kubernetes deployment spec example for a Java application, the init container is a second Docker image that contains the App Server Agent files. Because this Docker image is built separately from the application image, you do not need to rebuild the application image when you add or upgrade the App Server Agent.