2

If one uses expose in k8s then it is possible to assign an IP to an app so it could be accessed on the www.

It is also possible to configure an ingress. This is basically a rproxy.

What are reasons to use an ingress over expose?

1
  • 1
    With an ingress you can have multiples names on same port, no possible by exposing a port tied to only one service – Tensibai Mar 18 '18 at 16:31
2

As @Tensibai indicated:

With an ingress you can have multiples names on same port, no possible by exposing a port tied to only one service

0

From a technical perspective, they are working in different tcp/ip layers.

Expose command create a layer 4 tcp/udp port redirection. While ingress works at layer 7, ingress can do alot more like ssl offlloading, distribute loads based on HTTP headers, cookies, or url etc

1
  • Perhaps you could explain when one could choose the first and in what situation the latter. – 030 Mar 14 '20 at 10:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.