Welcome to the Linux Foundation Forum!

Lab 7.2 Ingress Controller - Service available via internal ip, not via ingress


I'm running into an issue with Lab 7.2. I've managed to create the ClusterRole and ClusterRole binding as well as the traefik ingress controller. After doing this the ingress controller is up but on the external IP address I get a Connection Refused message from curl.

ip address for this vbox host:

2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 08:00:27:99:32:3f brd ff:ff:ff:ff:ff:ff
inet brd scope global dynamic enp0s3
valid_lft 54906sec preferred_lft 54906sec
inet6 fe80::a00:27ff:fe99:323f/64 scope link
valid_lft forever preferred_lft forever

failing curl command:

[email protected]:~/LFD259/labs/7/app2$ curl -H "Host: www.example.com"
curl: (7) Failed to connect to port 80: Connection refused

Ingress exists, but it has no address. I suspect this might be the problem as the describe shows that the default-http-backend was not found (but I have no idea how to solve that...).

[email protected]:~/LFD259/labs/7/app2$ kubectl get ingress
ingress-test www.example.com 80 21h

[email protected]:~/LFD259/labs/7/app2$ kubectl describe ing ingress-test
Name: ingress-test
Namespace: default
Default backend: default-http-backend:80 ()
Host Path Backends
---- ---- --------
/ secondapp:80 (
Annotations: kubernetes.io/ingress.class: traefik

I'm using VirtualBox so as mentioned in the labs, there maybe issues when using LoadBalancer instead of NodePort. The service is available on NodePort and running correctly:

[email protected]:~/LFD259/labs/7/app2$ kubectl get svc
kubernetes ClusterIP 443/TCP 20d
nginx ClusterIP 443/TCP 19d
registry ClusterIP 5000/TCP 19d
secondapp LoadBalancer 80:32000/TCP 21h

[email protected]:~/LFD259/labs/7/app2$ kubectl describe svc secondapp
Name: secondapp
Namespace: default
Labels: run=my-nginx
Selector: example=second
Type: LoadBalancer
Port: 80/TCP
TargetPort: 80/TCP
NodePort: 32000/TCP
Session Affinity: None
External Traffic Policy: Cluster

[email protected]:~/LFD259/labs/7/app2$ curl
<!DOCTYPE html>

Welcome to nginx!

body { width: 35em; margin: 0 auto; font-family: Tahoma, Verdana, Arial, sans-serif; }

Welcome to nginx!

If you see this page, the nginx web server is successfully installed and working. Further configuration is required.

For online documentation and support please refer to nginx.org.
Commercial support is available at nginx.com.

Thank you for using nginx.

Any ideas what I'm missing here?


  • chrispokornichrispokorni Posts: 509

    Hi @tknoops,

    You mentioned this:

    I'm using VirtualBox so as mentioned in the labs, there maybe issues when using LoadBalancer instead of NodePort

    Yet your service is still a LoadBalancer type. Did you try changing it to a NodePort type instead?


  • tknoopstknoops Posts: 7

    HI @chrispokorni , completely forgot to mention that but yeah I did try that but to no effect. The labs don't say I have to change it back though as a NodePort will always be available even though there is no LoadBalancer available (like in non cloud setups like mine).

  • tknoopstknoops Posts: 7

    I removed everything, tried to switch to Traefik image 2.2.1 which got the traefik pods going into a error crash backoff loop. Switched back to image 1.17.3 (without removing anything but the serviceaccount/daemonset/service) and it worked. Not sure how as I've redeployed everything a few times already, but hope this helps someone in the future.

  • chrispokornichrispokorni Posts: 509

    The lab does not use traefik v2. If you read carefully step 4 of the ingress exercise, it states that v1.7.13 is used instead.

  • tknoopstknoops Posts: 7

    I'm aware of that but since 1.7.13 wasn't working either I was wondering if 2.2.1 did work. It didn't, but it did make me redeploy everything which somehow solved the issue :smile:

    For future references, address is still empty while I have both backend services available via the Traefik ingress service, so that wasn't part of the problem.

Sign In or Register to comment.