When an nginx 504 Gateway Time-out error occurs, configure each Ingress Controller as follows.
IBM Kubernetes Service (IKS) Ingress Controller
Add the following annotation to the Ingress resource.
client-max-body-size
Sets the maximum body size that a client can send as part of a request.
https://cloud.ibm.com/docs/containers?topic=containers-ingress_annotation#client-max-body-size
Sample Ingress Resource YAML
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: myingress
annotations:
ingress.bluemix.net/client-max-body-size: "serviceName=<myservice> size=<size>; size=<size>"
spec:
tls:
- hosts:
- mydomain
secretName: mytlssecret
rules:
- host: mydomain
http:
paths:
- path: /
backend:
serviceName: myservice
servicePort: 8080proxy-connect-timeout, proxy-read-timeout
Configures the time ALB waits to connect to the backend app and read from it before considering it unavailable.
proxy-connect-timeout: The time (in seconds or minutes) to wait while connecting to the backend app (e.g., 65s or 1m). The connection timeout cannot exceed 75 seconds.
proxy-read-timeout: The time (in seconds or minutes) to wait before reading from the backend app (e.g., 65s or 2m).
https://cloud.ibm.com/docs/containers?topic=containers-ingress_annotation#proxy-connect-timeout
Sample Ingress Resource YAML
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: myingress
annotations:
ingress.bluemix.net/proxy-connect-timeout: "serviceName=<myservice> timeout=<connect_timeout>"
ingress.bluemix.net/proxy-read-timeout: "serviceName=<myservice> timeout=<read_timeout>"
spec:
tls:
- hosts:
- mydomain
secretName: mytlssecret
rules:
- host: mydomain
http:
paths:
- path: /
backend:
serviceName: myservice
servicePort: 8080