Google Professional Cloud Developer Question 369
Select 4Google Cloud PlatformYou are tasked with deploying a containerized application to a Google Kubernetes Engine (GKE) cluster. The application requires a custom domain name and needs to securely expose its services to external users. Which steps should you take to ensure the application is deployed and accessible under the custom domain?
- A
Create a Kubernetes Deployment object to manage the application pods.
- B
Set up a Kubernetes Service of type LoadBalancer to expose the application externally.
- C
Configure a Kubernetes Ingress resource with the custom domain and TLS settings.
- D
Assign a static IP to the GKE cluster and configure the custom domain DNS to point to it.
- E
Deploy a Cloud Run service instead of using GKE to handle custom domain routing automatically.
Show answer and explanation
Correct answers: A, B, C, D
Explanation
Deploying a containerized application to GKE involves creating a Deployment to manage the application pods, exposing the application externally using a Service of type LoadBalancer, and configuring an Ingress resource to handle custom domain routing and TLS. Additionally, assigning a static IP and updating DNS settings ensures reliable access to the application via the custom domain. Cloud Run is not applicable in this scenario as the question focuses on GKE.
- A. Correct.
Correct. A Kubernetes Deployment ensures that the containerized application pods are managed and scaled appropriately.
- B. Correct.
Correct. A Service of type LoadBalancer is required to expose the application to external traffic and integrate with GCP's load balancer.
- C. Correct.
Correct. A Kubernetes Ingress resource is used to define rules for HTTP/HTTPS traffic and associate the custom domain with the application.
- D. Correct.
Correct. Assigning a static IP ensures the custom domain can reliably point to the application, and the DNS must be updated to associate the domain with the IP.
- E. Incorrect.
Incorrect. While Cloud Run supports custom domains, the question explicitly mentions deploying the application to GKE, so this option does not apply.