Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not detecting any ingresses (k3d and k3s) #19

Open
wlonkly opened this issue Dec 29, 2023 · 2 comments
Open

Not detecting any ingresses (k3d and k3s) #19

wlonkly opened this issue Dec 29, 2023 · 2 comments

Comments

@wlonkly
Copy link

wlonkly commented Dec 29, 2023

I'm running external-mdns in k3d, installed from the "with RBAC" example on the README, and while I expect to encounter some mdns issues, I haven't been able to get that far. Here's what's running:

$ kubectl get services --all-namespaces
NAMESPACE              NAME                        TYPE           CLUSTER-IP      EXTERNAL-IP                        PORT(S)                      AGE
default                kubernetes                  ClusterIP      10.43.0.1       <none>                             443/TCP                      115m
kube-system            kube-dns                    ClusterIP      10.43.0.10      <none>                             53/UDP,53/TCP,9153/TCP       115m
kube-system            metrics-server              ClusterIP      10.43.29.60     <none>                             443/TCP                      115m
kube-system            traefik                     LoadBalancer   10.43.34.105    172.27.0.2,172.27.0.3,172.27.0.4   80:31167/TCP,443:31220/TCP   113m
kubernetes-dashboard   kubernetes-dashboard        ClusterIP      10.43.76.41     <none>                             443/TCP                      100m
kubernetes-dashboard   dashboard-metrics-scraper   ClusterIP      10.43.35.73     <none>                             8000/TCP                     100m
default                nginx                       ClusterIP      10.43.195.151   <none>                             80/TCP                       17m

$ kubectl get ingress --all-namespaces
NAMESPACE   NAME              CLASS     HOSTS   ADDRESS                            PORTS   AGE
default     nginx-test        traefik   *       172.27.0.2,172.27.0.3,172.27.0.4   80      9m17s

but it only detects the traefik LoadBalancer, and not the nginx-test ingress:

2023/12/29 01:00:19 Failed to listen [ff02::fb]:5353: listen udp6 [ff02::fb]:5353: setsockopt: no such device
2023/12/29 01:00:19 app.config [default-namespace:"default" expose-ipv4:"true" expose-ipv6:"false" kubeconfig:"/.kube/config" master:"" namespace:"" publish-internal-services:"false" record-ttl:"120" source:"[ingress service]" test:"false" without-namespace:"false"]
2023/12/29 01:00:19 Added traefik.kube-system.local. 120 IN A 172.27.0.2
2023/12/29 01:00:19 Added 2.0.27.172.in-addr.arpa. 120 IN PTR traefik.kube-system.local.
2023/12/29 01:00:19 Added traefik-kube-system.local. 120 IN A 172.27.0.2
2023/12/29 01:00:19 Added 2.0.27.172.in-addr.arpa. 120 IN PTR traefik-kube-system.local.
2023/12/29 01:00:19 Added traefik.kube-system.local. 120 IN A 172.27.0.3
2023/12/29 01:00:19 Added 3.0.27.172.in-addr.arpa. 120 IN PTR traefik.kube-system.local.
2023/12/29 01:00:19 Added traefik-kube-system.local. 120 IN A 172.27.0.3
2023/12/29 01:00:19 Added 3.0.27.172.in-addr.arpa. 120 IN PTR traefik-kube-system.local.
2023/12/29 01:00:19 Added traefik.kube-system.local. 120 IN A 172.27.0.4
2023/12/29 01:00:19 Added 4.0.27.172.in-addr.arpa. 120 IN PTR traefik.kube-system.local.
2023/12/29 01:00:19 Added traefik-kube-system.local. 120 IN A 172.27.0.4
2023/12/29 01:00:19 Added 4.0.27.172.in-addr.arpa. 120 IN PTR traefik-kube-system.local.

The nginx-test ingress is:

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: nginx-test
  annotations:
    ingress.kubernetes.io/ssl-redirect: "false"
spec:
  rules:
  - http:
      paths:
      - path: /
        pathType: Prefix
        backend:
          service:
            name: nginx
            port:
              number: 80

It doesn't detect it on startup, and it also doesn't detect it if I delete and apply the ingress again.

Not sure where to start to see what might be going wrong. Any tips? Thanks!

@wlonkly wlonkly changed the title Not detecting any ingresses (k3d) Not detecting any ingresses (k3d and k3s) Jan 14, 2024
@wlonkly
Copy link
Author

wlonkly commented Jan 14, 2024

I wanted to test this without an additional layer of indirection, so I've tried it in k3s instead of k3d, with the same outcome: it detects ingresses but no services.

@plmercereau
Copy link

I bumped into a similar issue.
I then realised the ingress host should end with .local in order to be taken into account (see this part of the code).

For instance:

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: nginx-test
spec:
  ingressClassName: traefik
  rules:
  - host: nginx-test.local
    http:
      paths:
      - path: /
        pathType: Prefix
        backend:
           service:
             name: nginx
             port:
               number: 80

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants