<p>After applying <code>ingress</code> in <code>k8s</code>, I see service address was set to <code>node's</code> IP address?</p>
<p><strong>Firstly, I added ingress controller</strong></p>
<pre><code>kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v0.48.1/deploy/static/provider/baremetal/deploy.yaml
</code></pre>
<p><strong>Secondly, I add ingress yml:</strong></p>
<pre><code>apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: minimal-ingress1
  annotations:
    nginx.ingress.kubernetes.io/rewrite-target: /
    kubernetes.io/ingress.class: nginx
spec:
  rules:
  - host: &quot;n1.avocado.work&quot;
    http:
      paths:
      - path: /
        pathType: Prefix
        backend:
          service:
            name: node1
            port:
              number: 80
</code></pre>
<p><strong>Then I checked the ingress:</strong></p>
<pre><code>kubectl get ingress minimal-ingress1
</code></pre>
<p>The address was the node's IP, Why it's not the master's IP</p>
<p>I tried so many times, all the same result. How can I fix that? Any leads, please?</p>

John Wu
<p>If you are on bare metal, this is as per design.  check <a href="https://kubernetes.github.io/ingress-nginx/deploy/baremetal/" rel="nofollow noreferrer">this</a> for more info.</p>
<blockquote>
<p>MetalLB provides a network load-balancer implementation for Kubernetes
clusters that do not run on a supported cloud provider, effectively
allowing the usage of LoadBalancer Services within any cluster.</p>
<p>This section demonstrates how to use the Layer 2 configuration mode of
MetalLB together with the NGINX Ingress controller in a Kubernetes
cluster that has publicly accessible nodes. In this mode, <strong>one node
attracts all the traffic for the ingress-nginx Service IP</strong>. See
Traffic policies for more details.</p>
</blockquote>
