Using namerd for DNS? (Or: how to configure an nginx ingress service)

I currently have a hello world service deployed on /svc/hello, and I’ve added a dentry to my namerd internal dtab as /svc/app => /svc/hello.

I’ve also deployed an nginx service that will serve as my ingress controller, and forward all traffic to the relevant services. Eventually it’s going to do header stripping, exposing admin services only to developers in whitelisted ip ranges etc, but for now I’ve kept it really simple with the following config:

server {
  location / {
    proxy_pass http://app;

However, those nginx pods fail to start, with the error

nginx: [emerg] host not found in upstream “app” in /etc/nginx/conf.d/default.conf:3

What do I need to do to get the nginx services to be able to forward to the app service via linkerd?

I managed to solve this: The correct url to forward to is http://l5d.default.svc.cluster.local - with that, it correctly passes the traffic to linkerd, which can then route it to the appropriate service.

Great, glad you got it working!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.