An Ingress in GKE manages external access to services in a cluster, typically HTTP and HTTPS, by routing traffic to the right service based on rules.
Click to reveal answer
beginner
Which GCP resource does GKE Ingress create to expose services externally?
GKE Ingress creates a Google Cloud HTTP(S) Load Balancer to expose services outside the cluster.
Click to reveal answer
intermediate
What is the role of the Ingress controller in GKE?
The Ingress controller watches Ingress resources and configures the cloud load balancer to route traffic according to the Ingress rules.
Click to reveal answer
intermediate
Name one key annotation used in GKE Ingress to specify backend service timeout.
The annotation 'ingress.gcp.kubernetes.io/backend-config' is used to specify backend service settings like timeout.
Click to reveal answer
intermediate
How does GKE Ingress handle SSL/TLS termination?
GKE Ingress can terminate SSL/TLS at the load balancer by specifying TLS certificates in the Ingress resource, so encrypted traffic is decrypted before reaching services.
Click to reveal answer
What type of load balancer does GKE Ingress create by default?
ANetwork Load Balancer
BTCP Load Balancer
CInternal Load Balancer
DHTTP(S) Load Balancer
✗ Incorrect
GKE Ingress creates an HTTP(S) Load Balancer to route web traffic based on Ingress rules.
Which Kubernetes resource defines routing rules for GKE Ingress?
AIngress
BPod
CService
DConfigMap
✗ Incorrect
The Ingress resource defines how external traffic is routed to services.
How do you specify TLS certificates in GKE Ingress?
AUsing a Secret referenced in the Ingress TLS section
BIn the Service resource
CDirectly in the Pod spec
DIn the ConfigMap
✗ Incorrect
TLS certificates are stored in Secrets and referenced in the Ingress resource's TLS section.
What happens if you create an Ingress without any backend service?
AIngress controller returns an error
BTraffic is routed to default backend
CNo external access is configured
DLoad balancer routes traffic to all pods
✗ Incorrect
If no specific backend is defined, traffic goes to the default backend if configured.
Which annotation would you use to enable Cloud Armor security policies on GKE Ingress?
Aingress.kubernetes.io/enable-cloud-armor
Bingress.gcp.kubernetes.io/pre-shared-cert
Cingress.gcp.kubernetes.io/security-policy
Dingress.kubernetes.io/ssl-redirect
✗ Incorrect
The annotation 'ingress.gcp.kubernetes.io/security-policy' attaches Cloud Armor policies to the load balancer.
Explain how GKE Ingress uses a Load Balancer to route external traffic to services inside the cluster.
Think about how external users reach your app through the cloud load balancer.
You got /5 concepts.
Describe the steps to enable HTTPS traffic using GKE Ingress with a TLS certificate.
Focus on how certificates are stored and linked to Ingress.
You got /4 concepts.
Practice
(1/5)
1. What is the main purpose of using an Ingress with a Load Balancer in GKE?
easy
A. To restrict access to the cluster nodes only
B. To expose multiple services through a single external IP address
C. To create multiple IP addresses for each pod
D. To manage internal DNS records automatically
Solution
Step 1: Understand Ingress role in GKE
Ingress allows routing external traffic to multiple services inside the cluster using one IP.
Step 2: Recognize Load Balancer function
The Load Balancer created by Ingress exposes a single external IP to route traffic.
Final Answer:
To expose multiple services through a single external IP address -> Option B
Quick Check:
Ingress + Load Balancer = Single IP for many services [OK]
Hint: Ingress combines services under one IP address [OK]
Common Mistakes:
Thinking each pod gets its own IP
Confusing internal DNS with external exposure
Assuming Load Balancer creates multiple IPs
2. Which annotation is used in a GKE Ingress resource to specify the creation of a Google Cloud HTTP(S) Load Balancer?
easy
A. cloud.google.com/load-balancer-type: 'internal'
B. kubernetes.io/ingress.class: 'nginx'
C. kubernetes.io/ingress.class: 'gce'
D. networking.gke.io/load-balancer: 'external'
Solution
Step 1: Identify GKE Ingress annotation for Load Balancer
The annotation 'kubernetes.io/ingress.class: gce' tells GKE to use Google Cloud Load Balancer.
Step 2: Differentiate from other ingress classes
'nginx' is for NGINX ingress controller, not GCP Load Balancer.
Final Answer:
kubernetes.io/ingress.class: 'gce' -> Option C
Quick Check:
Use 'gce' annotation for GCP Load Balancer [OK]
Hint: Use 'kubernetes.io/ingress.class: gce' for GCP Load Balancer [OK]
Common Mistakes:
Using 'nginx' instead of 'gce' annotation
Confusing internal vs external load balancer annotations
Using non-existent annotation keys
3. Given this Ingress YAML snippet, what will happen when a user visits http://example.com/api?
5. You want to expose two services, frontend and backend, on the same IP but different paths using GKE Ingress with a Load Balancer. Which YAML snippet correctly configures this?