I began this post in the General channel but it got no traction. I'm moving it h . . .

LonnyBarry:
I began this post in the General channel but it got no traction. I’m moving it here with more detail and hope for an answer.

• 3 node cluster running 1.21.0 built using the Vagrantfile from the ‘Kubernetes The Hard Way’ github.
• Nginx ingress controller is deployed https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/static/provider/baremetal/deploy.yaml
• Simple httpd deployment, service and ingress.
http://<node01 IP address>:30080/ returns the “It works!” default page.
http://<node01 IP address from service>/ returns connection refused

Help?? I would really like to master this before moving on to the practice exams.

Madhan Kumar:
the IP address from the service is clusterIP and its accessible only form within the pods in the cluster .

Madhan Kumar:
you can try creating a temp pod in the same cluster and then try accessing the service from the temp pod and it should work.

Madhan Kumar:

LonnyBarry:
Ok. that’s pod to pod.
I’m getting the impression that this will not work without HAProxy, perhaps deployed on the master node

LonnyBarry:
Tried putting HAProxy in front, on the master. no luck.
Also tried metalLB and no luck.

LonnyBarry:
@Mumshad Mannambeth do you have any advice. I’m stuck and I’d really like to push through this. Bare metal build using Vagrant on my laptop and cannot access httpd service from the laptop. HAProxy and MetalLB both failed to resolve the issue.

LonnyBarry:
Once metalLB was configured, the service “httpd” was deleted and recreated as type LoadBalancer. finally, all is well in cluster.local

Mumshad Mannambeth:
@LonnyBarry sorry just saw this. Did you manage to get it working?

Mumshad Mannambeth:
When you said this did you mean you were trying to access the service at the node01 IP address? And expecting to hit the nginx ingress controller? From your laptop?
http://<node01 IP address from service>/ returns connection refused

LonnyBarry:
That is exactly correct, @Mumshad Mannambeth. What i’ve since come to realize is
• The need for the loadbalancer out in front of the Ingress, MetalLB in this case.
• The need for the Service to be of LoadBalancer type.
Add ip address and cluster.local to /etc/hosts and it works.

LonnyBarry:
@Mumshad Mannambeth I believe the baremetal + service + ingress + container based LB (metalLB) would be an excellent addition to the CKA course. As much of what you’ve covered on that applies to hosted k8s, not baremetal.

LonnyBarry:
as it is, my solution is still incorrect.