Kubernetes and Cloud Native Associate (KCNA) — Question 15
How to load and generate data required before the Pod startup?
Answer options
- A. Use an init container with shared file storage.
- B. Use a PVC volume.
- C. Use a sidecar container with shared volume.
- D. Use another pod with a PVC.
Correct answer: A
Explanation
The correct answer is A, as init containers are specifically designed to run before the main containers in a Pod, allowing for data preparation. Options B and D do not specifically address the timing of data preparation before Pod startup, while option C, though functional, does not prioritize the init phase like option A does.