Google Professional Cloud Developer Question 368
Select 4Google Cloud PlatformYou are deploying a containerized web application to Google Kubernetes Engine (GKE). The application requires a consistent URL and should be accessible over HTTPS. Which of the following steps must you perform during deployment?
- A
Create a Kubernetes Deployment and Service for the application.
- B
Configure a Kubernetes Ingress resource with an HTTP to HTTPS redirect.
- C
Use Cloud Build to build the container image and push it to Container Registry or Artifact Registry.
- D
Manually assign a static IP address to the GKE cluster nodes.
- E
Set up an SSL certificate for the custom domain using Google-managed certificates.
Show answer and explanation
Correct answers: A, B, C, E
Explanation
To deploy a containerized application to GKE with HTTPS, you must first create a Deployment and Service to run the application and expose it. Next, you configure an Ingress resource to handle routing and enforce HTTPS. The container image must be built and stored in a registry, such as Container Registry or Artifact Registry. Additionally, an SSL certificate is required for HTTPS, and Google-managed certificates simplify this process. Assigning a static IP to cluster nodes is not necessary for this setup.
- A. Correct.
Correct. A Kubernetes Deployment ensures the application is deployed and managed, while a Service exposes it to the network.
- B. Correct.
Correct. A Kubernetes Ingress resource allows you to configure routing and enforce HTTPS for secure communication.
- C. Correct.
Correct. You need to build the container and make it available in a container registry before deploying it to GKE.
- D. Incorrect.
Incorrect. Assigning a static IP to cluster nodes is unnecessary for this scenario. Instead, you can use a static IP for the load balancer if required.
- E. Correct.
Correct. To support HTTPS for your application, you need to set up an SSL certificate, and Google-managed certificates simplify this process.