How to manage Ingress which routes to different helm subcharts?

6/22/2019

I have the following applications (deployed with k8s) as helm subcharts:

  • Prometheus
  • Grafana
  • airflow-webserver
  • custom-application
  • custom-api
  • custom-webapp

This is nested under an umbrella chart.

The custom-webapp is the main application and should be routed to at mywebsite.com

I'm wondering how do I set up my ingress so that:

  • mywebsite.com routes to custom-webapp:5000
  • mywebsite.com/services/app routes to custom-application:5000
  • mywebsite.com/api/ routes to custom-api:5000
  • mywebsite.com/services/airflow routes to airflow:8080
  • mywebsite.com/services/prometheus routes to prometheus:9090
  • mywebsite.com/services/grafana routes to grafana:3000

Do I have 1 main ingress at the umbrella chart which routes to services exposed through subcharts? (the one i'm leaning most towards) OR Do I have multiple ingresses for each application ? In this case how do I tie them together?

This is hosted on GKE, and I'd kinda prefer to not pay for 1 ingress per application.

-- Panda
google-kubernetes-engine
kubernetes
kubernetes-helm

1 Answer

6/24/2019

You need to configure a collection of rules that will define which connections reach which services. You can aggregate several Ingress rules into a single Ingress definition.

If you are using Kubernetes 1.6+ you can check out this documentation regarding an nginx-ingress deployment on a Kubernetes cluster using the Helm package manager.

-- OhHiMark
Source: StackOverflow