0% found this document useful (0 votes)
5 views1 page

Init Containers

Init containers are specialized containers that run before application containers in a Pod, allowing for the execution of utilities or setup scripts not included in the app image. They can be specified in the Pod specification alongside the main containers. An example Pod configuration is provided, demonstrating how to define both init containers and app containers.

Uploaded by

ANU j
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views1 page

Init Containers

Init containers are specialized containers that run before application containers in a Pod, allowing for the execution of utilities or setup scripts not included in the app image. They can be specified in the Pod specification alongside the main containers. An example Pod configuration is provided, demonstrating how to define both init containers and app containers.

Uploaded by

ANU j
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Init Containers

This page provides an overview of init containers: specialized containers that run
before app containers in a Pod. Init containers can contain utilities or setup scripts
not present in an app image.

You can specify init containers in the Pod specification alongside the containers array
(which describes app containers)

apiVersion: v1
kind: Pod
metadata:
name: myapp-pod
labels:
app: myapp
spec:
containers:
- name: myapp-container
image: busybox:1.28
command: ['sh', '-c', 'echo The app is running! && sleep 3600']
initContainers:
- name: init-myservice
image: busybox:1.28
args:
- /bin/sh
- -c
- sleep 20;

You might also like