Kubernetes Certified Network Administrator (KCNA) Part 2 Practice Test

Access More Questions
Which is a use case for combining Init Containers with Persistent Volume Claims (PVCs)?
Correct Answer:
To initialize a database schema before the app starts
Explanation:
Init containers run to completion before the main application containers, and when they mount the same persistent volume, they can set up the data that the app will use. This makes it ideal to pre-create and populate a database’s schema or seed data in a volume before the application starts. By initializing the data directory on the PVC, the app container starts with a ready-to-use database, avoiding migrations or setup at first run and reducing startup failures. For example, a PVC backs the database data directory; an Init Container runs the schema creation and seeds, writes the initial state to the mounted path, and only then does the main app container start using that pre-initialized data. Other patterns like sidecar logging, health checks, or secret management serve different purposes and don’t specifically involve preparing a persistent data store before startup.

Access more questions from this quiz

Continue to Kubernetes Certified Network Administrator (KCNA) Part 2 Practice Test for more practice questions and the full quiz experience.

Access More Questions