2

I'm running on a simple KVM host and have poor man's load balancing with round robin DNS to and nginx ingress based on this chart which is documented here

So to direct traffic to backend pods it seems from those docs that all you would need to do is apply appropriate labels and magic will ensue.

It's a bit too magical for me and I'd rather just edit the nginx config and put reverse proxy entries in for the service urls for my microservices.

What's the typical way of doing this?

  • 1
    It should work just configuring controller.service.externalIPs array on values.yaml Could you share your values.xml file? Sorry, but I can't comment on your question. – Gabriel Miretti aka gmiretti Nov 24 '17 at 20:45
  • Yes indeed, I hadn't realised it was so simple to use in the end! – barrymac Dec 6 '17 at 12:43
2

What you have installed, the ingress controller, is only one part of the story. The other part is an ingress: in an ingress you define what pods/services should receive traffic of what domain and request path. The ingress controller picks this information up, and dynamically reconfigures the underlying proxy, in your case nginx. You can find examples of ingresses in the official documentation: https://kubernetes.io/docs/concepts/services-networking/ingress/#types-of-ingress

2

Ingress controllers allow you to not manually wire stuff up, that's the whole point.

If you'd rather do it manually You could have an nginx array (either inside Kubernetes our outside of it) and just point to the ip/port of the services that expose your microservices. If you use an nginx array external to Kubernetes you'd have to use the externalIP service type. If you run the Nginx array on Kubernetes you could store your "manual proxy config" in a configmap so that all your nginx proxies get the same config.

I would definetely advise to not do this tho. Ingress controllers are built to simplify traffic routing, and as your complexity grows you will definetely want to take advantage of them. A good labeling scheme is absolutely paramount in Kubernetes, and that goes for ingresses aswell.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.