Correct Answer: Configure an 'emptyDir' volume and mount it in both containers
An 'emptyDir' volume is created when a Pod is assigned to a Node, and exists as long as that Pod is running on that node. Containers in the same Pod can all read and write the same...
Correct Answer
Configure an 'emptyDir' volume and mount it in both containers
Why This Answer Is Correct
An 'emptyDir' volume is created when a Pod is assigned to a Node, and exists as long as that Pod is running on that node. Containers in the same Pod can all read and write the same files in the 'emptyDir' volume, making it the perfect choice for sharing data between a main app and a helper sidecar.
This question evaluates your knowledge of Kubernetes Core — a core concept tested in cloud certification exams. Understanding Kubernetes Core is essential for designing scalable, secure, and cost-effective cloud architectures. Mastery of this topic will help you answer scenario-based questions confidently on exam day.
To safely isolate resources (like Deployments and Services) belonging to different teams on the same cluster, you should use:
You have a Pod that needs access to a database configuration file (db-config.yaml) containing database endpoints, ports, and connection pool settings, and a database password. What is the Kubernetes best practice for storing and exposing these configurations to the Pod?
A security audit reveals that default service account tokens are being automatically mounted in all Pods, posing a credential exposure risk. How can you configure a Pod spec to prevent the automatic mounting of the default ServiceAccount token?
You have a database application pod that must wait for a configuration database service (config-db) to be fully running and accessible over the network before starting the main application container. What is the most resilient way to implement this dependency check?