HiveBrain v1.2.0
Get Started
← Back to all entries
patternkubernetesMinor

In kubernetes, using an nginx ingress controller what is recommended way of adding back end services?

Submitted by: @import:stackexchange-devops··
0
Viewed 0 times
ingresswhatrecommendedkuberneteswaynginxaddingcontrollerbackservices

Problem

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?

Solution

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.

Context

StackExchange DevOps Q#2637, answer score: 2

Revisions (0)

No revisions yet.