You run GKE with autoscaling and need to expose an app to the public via HTTPS on a public IP. What should you create?
Choose an answer
Tap an option to check your answer.
Correct answer: Create a Kubernetes Service of type NodePort for your application, and a Kubernetes Ingress to expose this Service via a Cloud Load Balancer..
Why this is the answer
To expose an application publicly via HTTPS with autoscaling in GKE, a Kubernetes Ingress is the most suitable solution. Ingress resources automatically provision and configure a Google Cloud HTTP(S) Load Balancer, which handles public IP assignment, SSL termination, and routing traffic to your backend services. The Ingress requires a backend Service, and a NodePort Service type is appropriate here as it exposes the application on a static port on each node, allowing the Ingress controller to discover and route traffic to it. Creating a ClusterIP Service alone would only make the application accessible within the cluster. Using a NodePort Service directly for public access would require managing DNS records for multiple node IPs and wouldn't provide a robust, single entry point with load balancing and SSL termination. Deploying a custom HAProxy pod adds unnecessary complexity and management overhead, as GKE's Ingress controller provides this functionality natively and integrates seamlessly with Google Cloud's load balancing infrastructure.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed