<p>We have on-prem kubernetes cluster set up with 1 master and 2 workers and metallb with calico networking. Issue is that our application is not opening from outside world.</p>

<p>I can curl external IP from my K8S cluster but can’t open the same from browser.</p>

<p>The IP range of master &amp; worker nodes is different from config map address pool -</p>

<p>Master/worker node --> a.b.c.d</p>

<p>Metallb config.yaml --></p>

<pre><code>apiVersion: v1
kind: ConfigMap
metadata:
namespace: metallb-system
name: config
data:
config: |
address-pools:
- name: default
protocol: layer2
addresses:
- w.x.y.z
</code></pre>

<p>I want to know if the address range in metallb config.yaml needs to be same as cluster network? Because when I give kubernetes cluster IP range, the application opens from outside, otherwise not.</p>

Anuj G
<p>To use MetalLB, your assign IPs range must be reachable from your cluster network. For example if your cluster IP is 192.168.1.0 /24 you can assign IPs from range 192.168.1.1 - 192.168.1.254</p>

<p>So if you will specify in <code>ConfigMap</code></p>

<pre><code>...
addresses:
      - 192.168.1.1-192.168.1.254
</code></pre>

<p>it will work. </p>

<p>However if you will set cluster IP for example 192.168.1.0/28 you will be able to use addresses only from range 192.168.1.1-192.168.1.14.</p>

<p>Please remember that network configruation and proper ConfigMap is not all. You have to create service(loadbalancer) which will expose your cluster to the world.</p>

<p>Please check <a href="https://metallb.universe.tf/tutorial/layer2/" rel="nofollow noreferrer">this MetalLB</a> tutorial. It contains example of proper MetalLB set.</p>
