Answers: <p>As @Tensibai indicated:</p>
  
  <blockquote>
    <p>With an ingress you can have multiples names on same port, no possible
    by exposing a port tied to only one service</p>
  </blockquote>
  
Answers: CC BY-SA 3.0
Answers: 2018-04-27T16:01:21.583Z
Answers: 2018-04-27T16:01:21.583Z
Answers: 030
Answers: <p>From a technical perspective, they are working in different tcp/ip layers.</p>
  
  <p>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</p>
  
Answers: CC BY-SA 4.0
Answers: 2020-03-14T10:12:57.080Z
Answers: Perhaps you could explain when one could choose the first and in what situation the latter.
Answers: 030
Answers: CC BY-SA 4.0
Answers: 2020-03-13T13:58:16.283Z
Answers: 2020-03-13T13:58:16.283Z
Answers: kokei
Body: <p>If one uses <code>expose</code> in k8s then it is possible to assign an IP to an app so it could be accessed on the www.</p>
  
  <p>It is also possible to configure an ingress. This is basically a rproxy. </p>
  
  <p>What are reasons to use an ingress over <code>expose</code>?</p>
  
Comments: CC BY-SA 3.0
Comments: 2018-03-18T16:31:23.617Z
Comments: With an ingress you can have multiples names on same port, no possible by exposing a port tied to only one service
Comments: Tensibai
Tags: <kubernetes>
Title: What are reasons to prefer an ingress over using `expose` in k8s?
UserDisplayName: 030
ThreadText: # What are reasons to prefer an ingress over using `expose` in k8s?
  
  (Asked by: username_0 on 2018-03-18)
  
  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`?
  
  **Tags:** kubernetes
  
  > **Comments:**
  > **username_1**: With an ingress you can have multiples names on same port, no possible by exposing a port tied to only one service  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_0 on 2018-04-27. Score: 2 | Accepted answer
  
  As @username_1 indicated:
  
  > With an ingress you can have multiples names on same port, no possible
  > by exposing a port tied to only one service
  
  
  ---
  
  ### Answer by username_2 on 2020-03-13. Score: 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
  
  > **Comments:**
  > **username_0**: Perhaps you could explain when one could choose the first and in what situation the latter.  
  
  ---
  
  