mecha kucha
mecha kucha

Reputation: 131

ingress external-ip doesn't exist

i made k8s service with kubeadm, flannel, ingress-nginx(bare metal) ON AWS ec2 instance (ubuntu 20.04). without EKS.

i want access my service with master node's public ip.

I tried with helm and kubectl to addon ingress-nginx

Then, applied an app, service, ingress

After that, "kubectl get ingress" command doesn't show me ADDRESS and "kubectl get svc" doesn't show EXTERNAL-IP

so, i patched external ip of master node with command

"kubectl patch svc nginx-ingress-nginx-ingress -p '{"spec":{"externalIPs":["<ec2-master-pub-ip>"]}}'"

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

I want to know solution!!

thank you

add : ingress.yml

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: node
spec:
  rules:
    - http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: node
                port:
                  number: 3000

Upvotes: 0

Views: 1167

Answers (1)

Pierre
Pierre

Reputation: 1933

For bare-metal to use service type LoadBalancer you need to install a virtual Loadbalancer solution like metallb

Upvotes: 2

Related Questions