<p>I am trying to deploy a docker image which is in public repository. I am trying to create a loadbalancer service, and trying to expose the service in my system ip address, and not 127.0.0.1.
I am using a windows 10 , and my docker has WSL2 instead of hyper-v.</p>
<p>Below is my .yaml file. So, the service inside will run in port 4200, so to avoid any kind of confusion I was keeping all the ports in 4200.</p>
<pre><code>apiVersion: v1
kind: Service
metadata:
  name: hoopla
spec:
  selector:
    app: hoopla
  ports:
    - protocol: TCP
      port: 4200
      targetPort: 4200
  clusterIP: 10.96.1.3
  type: LoadBalancer
status:
  loadBalancer:
    ingress:
    - ip: 192.168.0.144
---
apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app.kubernetes.io/name: hoopla
  name: hoopla
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/name: hoopla
  template:
    metadata:
      labels:
        app.kubernetes.io/name: hoopla
    spec:
      containers:
      - image: pubrepo/myimg:latest
        name: hoopla
        ports:
        - containerPort: 4200    

</code></pre>
<p>Can anybody help me here to understand what mistake I am making. I basically want to expose this on my system IP address.</p>

Wan Street
<p>The <code>loadBalancer</code> service type require a cloud provider's load Balancer ( <a href="https://kubernetes.io/docs/concepts/services-networking/service/" rel="nofollow noreferrer">https://kubernetes.io/docs/concepts/services-networking/service/</a> )</p>
<pre><code>LoadBalancer: Exposes the Service externally using a cloud provider's load balancer. NodePort and ClusterIP Services, to which the external load balancer routes, are automatically created
</code></pre>
<p>If you want to expose your service to your local machine, use kubernetes service <code>nodePort</code> type for example, and if you just want to test your webapp, you can use the kubernetes service <code>clusterIp</code> type and make a port-forward, for example with your clusterIp service:</p>
<pre><code>kubectl port-forward svc/hoopla 4200:4200
</code></pre>
