Conductor OSS on Kubernetes with Postgres and Nginx As Ingress Controller
Hello everyone, each day comes with new tasks. Some of which are done with ease and some challenges us to improve and this task was one of them.
Conductor is a platform originally created at Netflix to orchestrate microservices and events.
The Requirement
For this task we were required to deploy Conductor OSS (GitHub Repo) to our Kubernetes Cluster. In the Conductor OSS repo you can find both Dockerfile and docker compose file (by default conductor oss uses conductor server, conductor server ui, redis & elasticsearch) but we only wanted conductor server, ui and postgres for db and exposing though Nginx Ingress Controller.
The Simpler Task
My first task was to create a docker image of conductor server with ui which uses postgres db to run. I have shared docker image below.
docker pull iaminci/conductor-server:postgres
And The Challenging One
My real task began from here when I was trying to expose conductor service using Nginx Ingress Controller. I was getting blank page on browser for conductor service while it was working fine when using kubernetes port forwarding.
See below snippet of ingress.yaml I was using in which other services were using redirect and adding conductor server to the same namespace was giving blank page for conductor service.
name: nginx-ingress
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /
kubernetes.io/ingress.class: "nginx"
nginx.ingress.kubernetes.io/use-regex: "true"
nginx.ingress.kubernetes.io/rewrite-target: /$2
I’m not sure if its a bug or conductor server is uncompatible with ingress controller, when we use rewrite it gives us a blank page. To fix this issue I created another namespace to deploy conductor server and use below annotations.
name: nginx-ingress
annotations:
kubernetes.io/ingress.class: "nginx"
nginx.ingress.kubernetes.io/use-regex: "true"
nginx.ingress.kubernetes.io/rewrite-target: /
By using above annotations conductor server was accessible using ingress controller.