question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Ingress add-on not working in v1.20.0 (1864)

See original GitHub issue

I have been trying unsuccessfully to get ingress working in this release (working fine in 1.19). The ingress resource is created successfully, but there is nothing listening on the registered port on the nodes. I have now tried this with the ingress.yaml from the test suite and experience the same issue.

Steps to reproduce:

  • lsb_release -a
Distributor ID:	Ubuntu
Description:	Ubuntu 20.04.1 LTS
Release:	20.04
Codename:	focal
NAME                        READY   STATUS    RESTARTS   AGE
microbot-569dfdf8c8-t89v8   1/1     Running   0          22m
  • microk8s kubectl get svc
NAME         TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)   AGE
kubernetes   ClusterIP   10.152.183.1    <none>        443/TCP   3d13h
microbot     ClusterIP   10.152.183.39   <none>        80/TCP    24m
  • curl 10.152.183.39:80
<!DOCTYPE html>
<html>
  <style type="text/css">
    .centered
      {
      text-align:center;
      margin-top:0px;
      margin-bottom:0px;
      padding:0px;
      }
  </style>
  <body>
    <p class="centered"><img src="microbot.png" alt="microbot"/></p>
    <p class="centered">Container hostname: microbot-569dfdf8c8-t89v8</p>
  </body>
</html>
  • microk8s kubectl get ing
NAME                   CLASS    HOSTS                       ADDRESS     PORTS   AGE
microbot-ingress-xip   public   microbot.127.0.0.1.xip.io   127.0.0.1   80      26m
microbot-ingress-nip   public   microbot.127.0.0.1.nip.io   127.0.0.1   80      26m
  • curl microbot.127.0.0.1.xip.io:80 times out
  • curl microbot.127.0.0.1.nip.io:80 times out
  • lsof -i :80
COMMAND    PID USER   FD   TYPE   DEVICE SIZE/OFF NODE NAME
google_ne 1314 root    7u  IPv4 28872555      0t0  TCP c2-0.internal:40058->metadata.google.internal:http (ESTABLISHED)
google_ac 1315 root    5u  IPv4 28872886      0t0  TCP c2-0.internal:40056->metadata.google.internal:http (ESTABLISHED)
google_cl 1317 root    5u  IPv4 28865968      0t0  TCP c2-0.internal:39890->metadata.google.internal:http (CLOSE_WAIT)
google_cl 1317 root    6u  IPv4 28871510      0t0  TCP c2-0.internal:40032->metadata.google.internal:http (ESTABLISHED)

There is nothing listening on port 80

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:1
  • Comments:13 (3 by maintainers)

github_iconTop GitHub Comments

5reactions
emhusnancommented, Jan 26, 2021

If you have annotation kubernetes.io/ingress.class: nginx inside your ingress.yaml try to edit daemon set configuration, change line --ingress-class=public to --ingress-class=nginx

to edit configuration use kubectl edit daemonset.apps/nginx-ingress-microk8s-controller -n ingress

Name:           nginx-ingress-microk8s-controller
Selector:       name=nginx-ingress-microk8s
Node-Selector:  <none>
Labels:         microk8s-application=nginx-ingress-microk8s
...(truncated)...
    Args:
      /nginx-ingress-controller
      --configmap=$(POD_NAMESPACE)/nginx-load-balancer-microk8s-conf
      --tcp-services-configmap=$(POD_NAMESPACE)/nginx-ingress-tcp-microk8s-conf
      --udp-services-configmap=$(POD_NAMESPACE)/nginx-ingress-udp-microk8s-conf
      --ingress-class=public    <-- change this line
...(truncated)...

3reactions
djmcgreal-cccommented, Feb 18, 2021

The change of --ingress-class was introduced in https://github.com/ubuntu/microk8s/pull/1556. It’s unclear why, as the change doesn’t seem consistent with anything mentioned in the MR.

Do you know what the intention was for selecting public? As far as I could find there’s no wider standard here? Whereas, I’ve got several upstream apps that need to have nginx removed in awkward ways.

Edit: It seems other add-ons like metallb are able to take parameters, perhaps there would be a good argument for ingress class to be parameterised.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Ingress add-on not working in v1.20.0 (1864) #1890 - GitHub
I have been trying unsuccessfully to get ingress working in this release (working fine in 1.19). The ingress resource is created ...
Read more >
Why can't I enable ingress in minikube? - Stack Overflow
To fix you will need to first describe you pod: kubectl describe pod ingress-nginx-controller-xxxxx -n ingress-nginx.
Read more >
Updating NGINX-Ingress to use the stable Ingress API
Updating NGINX-Ingress to use the stable Ingress API ; v1.20, v0.47.x, Bugfixes only, and just for security issues or crashes. No end-of-support ...
Read more >
GKE Ingress for HTTP(S) Load Balancing - Google Cloud
For clusters running older GKE versions, the GKE controller processes any Ingress that does not have the annotation kubernetes.io/ingress.class , or has the ......
Read more >
Releases | NGINX Ingress Controller
NGINX Ingress Controller Release Notes. ... secrets of type helm.sh/release.v1. FIXES: 2971 fix: Correct error message on missing path in path validation.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found