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.

Routing with Nginx Ingress

See original GitHub issue

Issue Type:

  • Bug report
  • Feature request

What happened: This is not a bug or feature request. It’s purely a question and my lack of understanding on how to get linkerd to route correctly. I have an application that has a API path of /app1/api/v1/lookup/12345 which then looks up the value 12345 and returns a result. This will be just one of the microservices running under the same hostname https://services.example.com. So ultimately, my request URL looks like this https://services.example.com/app1/api/v1/lookup/12345. If I create an nginx ingress resource as https://services.example.com to svc/l5d on port 4140, when I try to request /app1/api/v1/lookup/12345 I get the following output.

No hosts are available for /svc/services.example.com, Dtab.base=[/srv=>/#/io.l5d.k8s/default/http;/host=>/srv;/svc=>/host;/host/world=>/srv/world-v1], Dtab.local=[]. Remote Info: Not Available

So it appears that linkerd service does not know it is bound to the hostname via ingress and tries to route to a svc with that name and fails.

I tried adding a value in the dtab to route /services.example.com => /svc but that doesn’t seem to work and yields the same error.

What you expected to happen: I’d like to linkerd to route incoming requests through ingress controller to my services.

How to reproduce it (as minimally and precisely as possible): As described above.

Anything else we need to know?:

Environment:

  • linkerd/namerd version, config files: 1.3.6
  • Platform, version, and config files (Kubernetes, DC/OS, etc): 1.9.3
  • Cloud provider or hardware configuration: vSphere

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
hawkwcommented, Mar 15, 2018

@eroji you’ll need to configure your application to use Linkerd as a proxy. Many (but not all) applications and frameworks support a http_proxy environment variable; otherwise, they’ll likely have their own method of configuring a HTTP proxy. See https://linkerd.io/getting-started/k8s/#configure-your-application for more information.

You might also be interested to note that, unlike Linkerd, the Conduit service mesh can be transparently injected into Kubernetes pods without requiring you to set it as a proxy; it will set iptables rules so that all outgoing requests are routed through Conduit automagically. However, it doesn’t currently support the kind of policy-based routing we discussed above, but this is on the roadmap.

0reactions
erojicommented, Mar 19, 2018

Thank you. I think this answers all my questions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Basic usage - NGINX Ingress Controller - Kubernetes
Basic usage - host based routing ¶. ingress-nginx can be used for many use cases, inside various cloud providers and supports a lot...
Read more >
Overview | NGINX Ingress Controller
NGINX Ingress Controller works with both NGINX and NGINX Plus and supports the standard Ingress features - content-based routing and TLS/SSL termination.
Read more >
Routing Applications in Kubernetes with Nginx-Ingress
An Ingress Controller is a daemon, deployed as a Kubernetes Pod, that watches the apiserver's /ingresses endpoint for updates to the Ingress ......
Read more >
Ingress - Kubernetes
Ingress exposes HTTP and HTTPS routes from outside the cluster to services within the cluster. Traffic routing is controlled by rules ...
Read more >
How to configure path based routing with ingress on ...
In my setup, ingress controller was using app=ingress-nginx label and is present in ingress-nginx namepsace. This will expose nginx-controller ...
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