<p>How to deploy kubernertes service (type LoadBalancer) on onprem VMs ? When I using type=LoadBalcer it's shows external IP as "pending" but everything works fine with the same yaml if I deployed on GKS. My question is-: </p>

<p>Do we need a Load balancer if I use type=LoadBalcer on Onprem VMs?
Can I assign LoadBalncer IP manually in yaml?</p>

Vikas Kalra
<p>You need to setup metalLB. </p>

<p>MetalLB hooks into your Kubernetes cluster, and provides a network load-balancer implementation. In short, it allows you to create Kubernetes services of type <code>LoadBalancer</code> in clusters that don’t run on a cloud provider, and thus cannot simply hook into paid products to provide load-balancers.</p>

<p>To install run</p>

<pre><code>kubectl apply -f https://raw.githubusercontent.com/metallb/metallb/v0.9.3/manifests/namespace.yaml
kubectl apply -f https://raw.githubusercontent.com/metallb/metallb/v0.9.3/manifests/metallb.yaml
</code></pre>

<p>For more details Click <a href="https://metallb.universe.tf/installation/" rel="nofollow noreferrer">here</a> to install</p>
