
Google Professional Cloud Developer
Get started today
Ultimate access to all questions.
You are migrating an existing Apache/MySQL/PHP application stack from a single server to Google Kubernetes Engine. You need to decide how to containerize the application while following Google's recommended best practices for high availability. What steps should you take?
You are migrating an existing Apache/MySQL/PHP application stack from a single server to Google Kubernetes Engine. You need to decide how to containerize the application while following Google's recommended best practices for high availability. What steps should you take?
Explanation:
Google recommends running each application component in separate containers to enable independent scaling, updates, and failure isolation. Using separate containers (Option A) aligns with the principle of one process per container, improving availability. Readiness and liveness probes ensure Kubernetes can monitor and manage container health, restarting unhealthy instances and routing traffic only when ready. Options B and D bundle all components into a single container, which violates best practices by coupling components and complicating lifecycle management. Option C uses a script for orchestration, which is less reliable than leveraging Kubernetes' native probes and controllers for availability.