Google Professional Cloud Developer Question 22
Select 3Google Cloud PlatformYour company is modernizing a legacy application that currently runs on-premises. The application consists of multiple tightly-coupled components that communicate via direct function calls. As part of the modernization effort, the company wants to containerize the application and deploy it to Google Kubernetes Engine (GKE). Which of the following practices should you implement to ensure a successful modernization?
- A
Refactor the application into smaller, loosely-coupled services that communicate via APIs.
- B
Package the entire application into a single container image for simplicity.
- C
Use Kubernetes ConfigMaps and Secrets to manage application configuration and sensitive data.
- D
Implement container health checks to ensure Kubernetes can monitor and restart failed containers.
- E
Deploy the application on a single-node Kubernetes cluster to minimize complexity.
Show answer and explanation
Correct answers: A, C, D
Explanation
To successfully modernize and containerize a legacy application for deployment on GKE, you should follow best practices such as decomposing the application into smaller services, leveraging Kubernetes-native features like ConfigMaps and Secrets, and implementing health checks for reliability. Avoiding monolithic designs and ensuring scalability by using multi-node clusters are also crucial for effective modernization.
- A. Correct.
Refactoring the application into smaller, loosely-coupled services is a key step in application modernization. It allows for better scalability, maintainability, and compatibility with container orchestration platforms like GKE.
- B. Incorrect.
Packaging the entire application into a single container image is not recommended because it leads to a monolithic architecture, which does not take full advantage of containerization and Kubernetes' capabilities.
- C. Correct.
Using Kubernetes ConfigMaps and Secrets to manage configuration and sensitive data is a best practice. It decouples configuration from the application code and ensures security for sensitive information.
- D. Correct.
Implementing container health checks is essential for Kubernetes to monitor application health and restart failed containers automatically, improving application reliability.
- E. Incorrect.
Deploying the application on a single-node Kubernetes cluster does not provide the scalability and fault tolerance required for a production-grade system, which defeats the purpose of using Kubernetes.