<p>i made k8s service with
kubeadm, flannel, ingress-nginx(bare metal)
ON AWS ec2 instance (ubuntu 20.04). without EKS.</p>
<p>i want access my service with master node's public ip.</p>
<p>I tried with helm and kubectl to addon ingress-nginx</p>
<ul>
<li><code>helm install nginx-ingress nginx-stable/nginx-ingress --set rbac.create=true</code></li>
<li><code>kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.1.2/deploy/static/provider/baremetal/deploy.yaml</code></li>
</ul>
<p>Then, applied an app, service, ingress</p>
<p>After that, <code>&quot;kubectl get ingress&quot; command doesn't show me ADDRESS and &quot;kubectl get svc&quot;</code> doesn't show EXTERNAL-IP</p>
<p>so, i patched external ip of master node with command</p>
<pre><code>&quot;kubectl patch svc nginx-ingress-nginx-ingress -p '{&quot;spec&quot;:{&quot;externalIPs&quot;:[&quot;&lt;ec2-master-pub-ip&gt;&quot;]}}'&quot;
</code></pre>
<p>I queried to that ip:port, but can't accessed.
also, i patched external ip with worker node's public ip.
when queried to worker node, i got 404 error from nginx</p>
<p>I want to know solution!!</p>
<p>thank you</p>
<p>add : ingress.yml</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: node
spec:
  rules:
    - http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: node
                port:
                  number: 3000</code></pre>
</div>
</div>
</p>

mecha kucha
<p>For bare-metal to use service type LoadBalancer you need to install a virtual Loadbalancer solution like <a href="https://metallb.universe.tf/installation/" rel="nofollow noreferrer">metallb</a></p>
