Google Associate Cloud Engineer Question 207
Select 3Google Cloud PlatformYou are tasked with deploying a new microservice application on Google Kubernetes Engine (GKE). The application requires seamless scaling based on CPU utilization and needs to be publicly accessible via a domain name. Which of the following steps should you take to meet these requirements?
- A
A. Create a Kubernetes Deployment and specify a Horizontal Pod Autoscaler based on CPU utilization.
- B
B. Use a LoadBalancer service to expose the application to the internet.
- C
C. Use a ClusterIP service to expose the application internally.
- D
D. Implement a NodePort service to expose the application externally.
- E
E. Configure an Ingress resource to manage external access and domain routing.
Show answer and explanation
Correct answers: A, B, E
Explanation
To deploy a microservice on GKE with automatic scaling and public accessibility, you should create a Deployment and use a Horizontal Pod Autoscaler for scaling based on CPU utilization. To expose the application publicly, you should use a LoadBalancer service. Additionally, configuring an Ingress resource allows you to manage external access effectively, including routing based on domain names. These steps ensure the application is scalable and accessible according to the requirements.
- A. Correct.
A. Creating a Deployment with a Horizontal Pod Autoscaler is correct for scaling based on CPU utilization.
- B. Correct.
B. A LoadBalancer service is appropriate for exposing the application to the internet.
- C. Incorrect.
C. A ClusterIP service is for internal access and does not meet the requirement for public access.
- D. Incorrect.
D. A NodePort service exposes the application, but it is not optimal for domain routing and large-scale public access.
- E. Correct.
E. An Ingress resource is necessary to manage external access and map a domain name to the service.