PROFESSIONAL-CLOUD-DEVELOPER · Question #102
PROFESSIONAL-CLOUD-DEVELOPER Question #102: Real Exam Question with Answer & Explanation
The correct answer is A: Package each component in a separate container. Implement readiness and liveness probes.. https://cloud.google.com/architecture/best-practices-for-building- containers#package_a_single_app_per_container When you start working with containers, it's a common mistake to treat them as virtual machines that can run many different things simultaneously. A container can work
Question
You are porting an existing Apache/MySQL/PHP application stack from a single machine to Google Kubernetes Engine. You need to determine how to containerize the application. Your approach should follow Google-recommended best practices for availability. What should you do?
Options
- APackage each component in a separate container. Implement readiness and liveness probes.
- BPackage the application in a single container. Use a process management tool to manage each
- CPackage each component in a separate container. Use a script to orchestrate the launch of the
- DPackage the application in a single container. Use a bash script as an entrypoint to the container,
Explanation
https://cloud.google.com/architecture/best-practices-for-building- containers#package_a_single_app_per_container When you start working with containers, it's a common mistake to treat them as virtual machines that can run many different things simultaneously. A container can work this way, but doing so reduces most of the advantages of the container model. For example, take a classic Apache/MySQL/PHP stack: you might be tempted to run all the components in a single container. However, the best practice is to use two or three different containers: one for Apache, one for MySQL, and potentially one for PHP if you are running PHP-FPM.
Topics
Community Discussion
No community discussion yet for this question.