How to configure Ingress request timeouts on GKE
System Design practice on Codemia
Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.
Introduction
On GKE, request timeouts for the built-in Google Cloud load balancer are not usually set directly on the Ingress object with a generic timeout annotation. The standard path is to create a BackendConfig and attach it to the Service behind the Ingress. Once that is clear, the configuration becomes straightforward and much less confusing than mixing advice for GKE, NGINX Ingress, and other controllers.
The GKE-Specific Model
A common mistake is to search for a single universal "Ingress timeout annotation" and apply examples from a different ingress controller. GKE's default external HTTP(S) Ingress uses Google Cloud load balancing, so the backend service settings are configured through GKE-specific resources.
For request timeout behavior, the key field is timeoutSec in a BackendConfig.
Create A BackendConfig
Here is a minimal example that sets a 10-minute backend timeout.
This tells the Google Cloud backend service how long it may wait for the backend before timing out the request.
Attach It To The Service
The BackendConfig is not referenced directly by the Ingress. It is attached to the Service through an annotation.
That service is then used by the Ingress in the normal way.
Example Ingress
Once the Ingress points to the annotated service, GKE creates or updates the underlying backend service with the timeout configuration.
Verify The Result
After applying the manifests, give GKE time to reconcile. Then inspect both Kubernetes and Google Cloud state.
From Kubernetes:
From Google Cloud, you can also inspect the backend service if needed:
That helps confirm whether the timeout setting actually propagated.
Distinguish Request Timeout From Other Timeouts
timeoutSec is not the only timeout in the path. Depending on the workload, you may also care about:
- client-side timeouts
- application server timeouts
- health check behavior
- connection draining and backend shutdown timing
Changing only the GKE backend timeout will not fix every long-request problem if the application or client closes earlier.
Do Not Mix Controller Documentation
A lot of confusion comes from mixing controller-specific guides. An annotation that works for NGINX Ingress may do nothing on GKE's native controller. If the cluster uses a different ingress controller than the default GKE one, the correct timeout mechanism may be completely different.
So before copying YAML from the internet, confirm which controller is actually serving the Ingress.
Common Pitfalls
- Putting timeout annotations on the
Ingresscopied from another controller such as NGINX and expecting GKE to honor them. - Creating a
BackendConfigbut forgetting to attach it to theService. - Updating the YAML and then checking too quickly before GKE has finished reconciling the backend service.
- Treating
timeoutSecas the only timeout in the request path when the client or application server may still terminate earlier. - Forgetting that the service behind a GKE external Ingress is commonly a
NodePortservice.
Summary
- On GKE's native Ingress, request timeout is typically configured through
BackendConfig.spec.timeoutSec. - Attach the
BackendConfigto the backendService, not directly to theIngress. - Use the Ingress normally after the service is annotated.
- Verify the change after reconciliation rather than assuming the manifests applied instantly.
- Always match the timeout method to the actual ingress controller in use.
Related reading
- how to configure ingress to direct traffic to an https backend using https
- How to configure Keycloak Helm Chart
- How to configure kubectl with cluster information from a .conf file?
- How to configure log-driver in kubernetes pods file?
- How to Configure Pod initialization in a specific order in Kubernetes?
- How to configure VPN connection between 2 Kubernetes clusters
- How to confirm minikube is using hyperkit
- How to connect MySQL running on Kubernetes

System Design Fundamentals
Build a strong foundation in designing scalable, reliable distributed systems.
View the courseTrack what you have practised
A free account saves your progress, solutions and study plan across every problem on Codemia.
System Design practice on Codemia
Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.