Without additional information regarding (like i the actual setup of your HAProxy Ingress controller
it could be hard to pinpoint the actual issue.
There are conflicting information in your question related to the provisioning of your HAProxy Ingress Controller
:
- Logs from your question are pointing to:
- A comment that you made is pointing to:
The most probable cause that you are getting connection refused is that the Service
of your HAProxy Ingress Controller
is configured in a way that doesn't allow you to just hit the: http://jenkins-test-ci.xyz.com
(port 80).
Assuming that you followed the documentation (either one), both solutions use Service
of type NodePort
to allow the inbound traffic to hit the controller. This is inherently forcing your Ingress
resources to be available on node_ip:nodeport
(nodeport
port range: 30000
-32767
):
You can check how your Ingress
controller is exposed by running:
$ kubectl get svc -n NAMESPACE
The output of above command should be similar to:
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
haproxy-ingress NodePort 10.233.39.4 <none> 80:32149/TCP,443:30011/TCP,1024:31532/TCP 3h56m
ingress-default-backend ClusterIP 10.233.18.215 <none> 8080/TCP 3h56m
Following this example if you have an app exposed with an Ingress
resource and you would like to connect to it, you would need to connect to node_ip:32149
(see the ports on the haproxy-ingress
).
To be able to expose your Jenkins
on ports like 80
and/or 443
with an Ingress
resource you will need to use Service
of type LoadBalancer
. The Service
that is used to expose your HAProxy Ingress Controller
will need to be changed from NodePort
to LoadBalancer
type.
This Service
(LoadBalancer
) will require you to "provide" an IP address that could be allocated for this specific reason. With provider managed Kubernetes solution like GKE
, EKS
or AKS
this process is automated. For solutions that are on premise you will need to use MetalLB
:
Kubernetes does not offer an implementation of network load-balancers (Services of type LoadBalancer) for bare metal clusters. The implementations of Network LB that Kubernetes does ship with are all glue code that calls out to various IaaS platforms (GCP, AWS, Azure…). If you’re not running on a supported IaaS platform (GCP, AWS, Azure…), LoadBalancers will remain in the “pending” state indefinitely when created.
Bare metal cluster operators are left with two lesser tools to bring user traffic into their clusters, “NodePort” and “externalIPs” services. Both of these options have significant downsides for production use, which makes bare metal clusters second class citizens in the Kubernetes ecosystem.
MetalLB aims to redress this imbalance by offering a Network LB implementation that integrates with standard network equipment, so that external services on bare metal clusters also “just work” as much as possible.
Additional resources: