voyagermesh / voyager

🚀 Secure L7/L4 (HAProxy) Ingress Controller for Kubernetes
https://voyagermesh.com
Apache License 2.0
1.35k stars 134 forks source link

Multiple ingresses using the same voyager service and ELB #1414

Open kostas-rs opened 5 years ago

kostas-rs commented 5 years ago

Hi All,

I am quite new to Kubernetes so please excuse my ignorance. I was reading throught this article https://itnext.io/save-on-your-aws-bill-with-kubernetes-ingress-148214a79dcb which explains how to setup nginx using multiple ingress objects but a single ELB. I was wondering if this is something that voyager supports as well?

From my testing, for each ingress object voyager will create a coresponding service (along with the ELB). Would it be possible to have a multiple ingress objects using the same service/ELB?

Thank you

cradules commented 5 years ago

Hi,

I have same need. I have been looking around and voyager ingress dose not support this future, I hope is just for the moment. How I have been able to do it is to keep a single ingress yaml file and now I am thinking to a processes to maintain that file.

All I hope is this future will become implemented. A cluster with 800-1000 applications and all exposed is not so ok with 1000 ELB on aws.

ssro commented 5 years ago

This is possible. You create your deployments/services as usual then create an ingress resource where you declare the hosts and the backends serving those hosts. You can do this even across namespaces, if voyager is installed without namespace restriction. This means one ELB/NLB and as many hosts as you want. The service which "serves" your deployment shouldn't be type: Loadbalancer, it should be the default, meaning type: ClusterIP. The ingress resource will request the load balancer, not the service.

cradules commented 5 years ago

@ssro Thank you, I will try it!

cradules commented 5 years ago

I have been testing the deploy of an application using igress.yaml. The ingress is created but when I am deploying the second service to use same ingress is falling: Error: release xxxxxx failed: ingresses.voyager.appscode.com "xxxx-ingress-voyager" already exists

The idea is to use same chart for deploying multiple services using same ingress/ELB

If am changing the template to a dynamic name like {{.Release.Name}} this will create a new ingress and implicit a new ELB

With k8s objects dose work but I want to use helm ingress template.