I have 6 HTTP micro-services. Currently they run in a crazy bash/custom deploy tools setup (dokku, mup).
I dockerized them and moved to kubernetes on AWS (setup with kop). The last piece is converting my nginx config.
I'd like
- All 6 to have SSL termination (not in the docker image)
- 4 need websockets and client IP session affinity (Meteor, Socket.io)
- 5 need http->https forwarding
- 1 serves the same content on http and https
I did 1. SSL termination setting the service type to LoadBalancer and using AWS specific annotations. This created AWS load balancers, but this seems like a dead end for the other requirements.
I looked at Ingress, but don't see how to do it on AWS. Will this Ingress Controller work on AWS?
Do I need an nginx controller in each pod? This looked interesting, but I'm not sure how recent/relevant it is.
I'm not sure what direction to start in. What will work?
Mike
There may be a better way to do this. I wrote this answer because I asked the question. It's the best I could come up with Pixel Elephant's doc links above.
The default-http-backend is very useful for debugging. +1
Ingress
(markdown placeholder because no ```)
App Service and Deployment
(markdown placeholder because no ```)
Ingress Nginx Docker Image
-v
below(markdown placeholder because no ```)
Default Backend (this is copy/paste from .yaml file)
This config uses three secrets:
You should be able to use the nginx ingress controller to accomplish this.
The README walks you through how to set it up, and there are plenty of examples.
The basic pieces you need to make this work are:
The end result is that you will have a single ELB that corresponds to your nginx ingress controller service, which in turn is responsible for routing to your individual services according to the ingress rules specified.