question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Ingress returns 504 for all requests

See original GitHub issue

Describe the bug I follow this tutorial and this article to install Ambassador on my GKE cluster with an Ingress, but all requests sent to my Ingress returns 502 Server Error.

Reading logs, I found this warn, but I think this is not the problem:

[2020-05-29 22:03:31.395][113][warning][misc] [bazel-out/k8-opt/bin/source/extensions/common/_virtual_includes/utility_lib/extensions/common/utility.h:65] Using deprecated extension name 'envoy.router' for 'envoy.filters.http.router'. This name will be removed from Envoy soon. Please see https://www.envoyproxy.io/docs/envoy/latest/intro/deprecated for details

Expected behavior

Installation works and sends traffic to web deployments configured using Mappings.

Versions (please complete the following information):

  • Ambassador: 1.5.0
  • Kubernetes environment: Google Kubernetes Engine
  • Version: 1.16.8-gke-15

Additional context

Configurartions files:

ambassador-rbac.yaml was added also this section:

apiVersion: v1
kind: Service
metadata:
  name: ambassador
spec:
  type: NodePort
  ports:
    - name: ambassador
      port: 8080
      targetPort: 8080
  selector:
    service: ambassador

ingress.yaml

apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
  name: ambassador-ingress
spec:
  backend:
    serviceName: ambassador
    servicePort: 8080

web.yaml

apiVersion: apps/v1
kind: Deployment
metadata:
  name: web
spec:
  selector:
    matchLabels:
      run: web
  template:
    metadata:
      labels:
        run: web
    spec:
      containers:
      - image: gcr.io/google-samples/hello-app:1.0
        imagePullPolicy: IfNotPresent
        name: web
        ports:
        - containerPort: 8080
          protocol: TCP

---

apiVersion: v1
kind: Service
metadata:
  name: web
spec:
  type: NodePort
  selector:
    run: web
  ports:
  - port: 8080
    protocol: TCP
    targetPort: 8080

---

apiVersion: getambassador.io/v2
kind: Mapping
metadata:
  name: web
spec:
  prefix: /*
  service: web:8080

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:14 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
thiagolsfortunatocommented, Jun 3, 2020

@admiralobvious I fix my configs and now It’s working. 🎉

My suggestion is to update this tutorial, adding the section of the configuring Hosts. By default, Ambassador redirects all requests to HTTPS, but I believe this is not required on init configuration. To works do that we need to research and add more complexity to configuration, like add Cert Manager to generate a valid certificate, then add to Host to fix redirect 301.

Only adding this configuration about Host on the tutorial, It’s enough.

apiVersion: getambassador.io/v2
kind: Host
metadata:
  name: ambassador
spec:
  hostname: '*'
  acmeProvider:
    authority: none
  requestPolicy:
    insecure:
      action: Route
1reaction
alexferlcommented, Jun 1, 2020

So recreating the Ingress on the existing cluster didn’t fix the issue.

Describing my Ingress I see:

  hub.test.mydomain.co
                            /*   ambassador:8080 (<none>)

Although the backend is healthy:

"k8s-be-32067--b429978f36e45cd8":"HEALTHY"

Seems like it can’t see the ambassadors? They’re definitely running and I can cURL them from within the cluster.

NAME                             READY   STATUS    RESTARTS   AGE     IP           NODE                                          NOMINATED NODE   READINESS GATES
ambassador-5d7684c8f7-gglcv      1/1     Running   0          27m     10.7.11.13   gke-test-1-app-pool-93007a16-7c54             <none>           <none>
ambassador-5d7684c8f7-skrrd      1/1     Running   0          27m     10.7.11.14   gke-test-1-app-pool-93007a16-7c54             <none>           <none>
ambassador-5d7684c8f7-tnn49      1/1     Running   0          27m     10.7.11.12   gke-test-1-app-pool-93007a16-7c54             <none>           <none>
NAME                TYPE           CLUSTER-IP    EXTERNAL-IP      PORT(S)             AGE
ambassador          NodePort       10.7.7.136    <none>           8080:32067/TCP      42m
ambassador-admin    NodePort       10.7.6.144    <none>           8877:32105/TCP      44m
appuser@api-6d646bfdb-cflc7:~$ curl http://10.7.11.13:8877/ambassador/v0/check_ready
ambassador readiness check OK (3 seconds ago)

I correctly edited the health-check on 32067 to point to 32105 and /ambassador/v0/check_ready too as the backend is shown as HEALTHY.

Read more comments on GitHub >

github_iconTop Results From Across the Web

504 Gateway time out (if the backed takes more than 60 ...
Create a fission function that takes more than 60 seconds to be completed expose that function using HTTP trigger and ingress, curl to...
Read more >
Kubernetes Ingress (Specific APP) 504 Gateway Time-Out ...
Kubernetes Ingress (Specific APP) 504 Gateway Time-Out with 60 seconds · Its your local env or cloud? How did you deploy Ingress? Did...
Read more >
Resolve HTTP 504 errors in Amazon EKS - AWS
You get HTTP 504 errors when you connect to a Kubernetes Service pod that's located in an Amazon EKS cluster configured for a...
Read more >
504 Gateway Timeout error on Kubernetes Ingress - Reddit
I am getting 504 Gateway Timeout error when I attempt a request to my .Net Core API running behind Ingress Load Balancer using...
Read more >
Applications Failing With Error "504 Gateway Timeout
Problem. Ingress controller logs shows a gateway timeout error.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found