<p>Question is straightforward, but I've not been able to quite figure out which steps a request follows when it reaches kubernetes system.</p>
<ol>
<li>Who first handle a received request? <code>Ingress Controller</code>, <code>LoadBalancer</code>, <code>ClusterIP</code>...</li>
</ol>
<p>So, I know there are several ways to make pods externally accessible:</p>
<ol>
<li>Creating a <code>NodePort</code> service.</li>
<li>Creating an <code>LoadBalancer</code> service.</li>
<li>Creating an <code>Ingress</code> rule.</li>
</ol>
<p>Some questions here related with best-practices or mandatory facts?</p>
<ol>
<li><p><code>Ingress</code> is in front of a <code>ClusterIP Service</code> mandatory?</p>
<p>1.1 Could or shouldn't I create an <code>Ingress</code> in front of a <code>NodePort</code> or a <code>LoadBalancer</code> service?</p>
</li>
<li><p><code>Ingress Controllers</code> are <code>LoadBalancer Services</code>? I mean, <code>traefik</code> or other <code>Ingress Controllers</code> are all of them deployed as <code>LoadBalancer</code> services?</p>
</li>
</ol>
<p>Misunderstanding arises from several texts I've found over there:</p>
<ol>
<li><a href="http://www.sandtable.com/wp-content/uploads/2016/12/New_infra-750x487.jpg" rel="nofollow noreferrer">image here</a>: Seems <code>LoadBalancer</code> is placed first of <code>Ingress Controllers</code>.</li>
<li><a href="https://refactorizando.com/wp-content/uploads/2021/08/Ingress-Kubernetes-1-1024x527.png" rel="nofollow noreferrer">image here</a>: Seems <code>Ingress</code> is in front of a <code>LoadBalancer</code>.</li>
</ol>
<p>Above questions arises from an attempt of expose externally a <code>mongodb</code> replicatset.</p>
<ol>
<li>I've created a <code>LoadBalancer</code> for each node. Is this correct?</li>
<li>I'd like to create a domain using my <code>Ingress Controller</code> for those <code>LoadBalancer</code>. Can this be possible?</li>
<li>Is there point to create an Ingress in front of a headless service?</li>
</ol>

Jordi
<blockquote>
<p>Ingress is in front of a ClusterIP Service mandatory?</p>
</blockquote>
<p>If you want the service accessible externally, then you will need an externally accessible service. This can be a LoadBalancer service or an Ingress. A ClusterIP service is not accessible outside the cluster.</p>
<blockquote>
<p>Could or shouldn't I create an Ingress in front of a NodePort or a LoadBalancer service?</p>
</blockquote>
<p>You <em>can</em> create an Ingress in front of a NodePort or LoadBalancer, but there's no point in creating an Ingress in front of a LoadBalancer unless you want two different endpoints for accessing the same service (the LoadBalancer will get one IP and the Ingress Controller's own LoadBalancer will get another IP). However, using an Ingress will allow you to have additional functionality, such as SSL Certificates, which the standard LoadBalancer service resource does not (normally) provide</p>
<blockquote>
<p>Ingress Controllers are LoadBalancer Services? I mean, traefik or other Ingress Controllers are all of them deployed as LoadBalancer services?</p>
</blockquote>
<p>Correct. An Ingress controller opens an endpoint for traffic into the cluster, and then uses the ingress resources you create in the cluster to determine how and where to route the traffic.</p>
<p>The endpoint is a publicly accessible endpoint (unless you configure it to be an internal loadbalancer, in which case only machines within your corporate network will be able to access it).</p>
<p>The controller will normally update the Ingress resource in your cluster so you will see the IP of the loadbalancer belonging to the ingress</p>
