5

I'm running Kubernetes on Google Compute Engine (GCE). I have an Ingress set up. Everything works perfectly except when I upload large files, the L7 HTTPS Load Balancer terminates the connection after 30 seconds. I know that I can bump this up manually in the "Backend Service", but I'm wondering if there is a way to do this from the Ingress spec. I worry that my manual tweak will get changed back to 30s later on.

The nginx ingress controller has a number of annotations that can be used to configure nginx. Does the GCE L7 Load Balancer have something similar?

Jonas
  • 121,568
  • 97
  • 310
  • 388
Jesse Shieh
  • 4,660
  • 5
  • 34
  • 49
  • Yes, it has similar annotations. Quicker then finding these is probably to configure it through the Google Cloud Console – Norbert Jun 17 '17 at 17:06
  • I'm worried that if I change something manually, the changes will be overwritten next time I change my ingress spec. – Jesse Shieh Jun 17 '17 at 17:17

2 Answers2

7

This can now be configured within GKE, by using a custom resource BackendConfig.

apiVersion: cloud.google.com/v1beta1
kind: BackendConfig
metadata:
  name: my-bconfig
spec:
  timeoutSec: 60

And then configuring your Service to use this configuration with an annotation:

apiVersion: v1
kind: Service
metadata:
  name: my-service
  annotations:
    beta.cloud.google.com/backend-config: '{"ports": {"80":"my-bconfig"}}'
spec:
  ports:
  - port: 80
  .... other fields

See Configuring a backend service through Ingress

Jonas
  • 121,568
  • 97
  • 310
  • 388
2

For anyone else looking for the solution to this problem, timeout and other settings (e.g. enable CDN) can only be configured manually at the moment.

Follow this kubernetes/ingress-gce issue for the latest updates on a long-term solution.

tmirks
  • 503
  • 5
  • 11