Kubernetes proxy route traffic to different sub services depending on request path

10/25/2016

Very simple and common case, i have 2 pods in cluser:

  1. wordpress blog + mysql
  2. nginx serving static web site

I want to show static web site when user load http://my-site.com and show blog when user will do http://my-site/blog Without kubernetes I would just use haproxy with rules analysing request path, I don't have so much experience in kubernetes to build it right way. Should 1 and 2 pods be a services as well?

-- abovesun
haproxy
kubernetes
wordpress

1 Answer

10/26/2016

One way to accomplish this may be to use an ingress resource. You could make the two services and then point at them from the ingress resource.

Reference: Simple fanout using ingress resources.

-- Anirudh Ramanathan
Source: StackOverflow