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

No dnsendpoint resource created #23

Open
mozarik opened this issue Jul 29, 2022 · 6 comments
Open

No dnsendpoint resource created #23

mozarik opened this issue Jul 29, 2022 · 6 comments

Comments

@mozarik
Copy link

mozarik commented Jul 29, 2022

Hi how do i've apply the traefik ingressroute. But somehow switchboard doesnt create dnsendpoint resource for it/

pods logs

I0729 15:09:22.924478       1 request.go:601] Waited for 1.030966019s due to client-side throttling, not priority and fairness, request: GET:https://10.43.0.1:443/apis/management.cattle.io/v3?timeout=32s
2022-07-29T15:09:22.978Z        INFO    launching manager
2022-07-29T15:09:23.079Z        INFO    ingress route is up to date     {"name": "traefik/traefik-dashboard"}
2022-07-29T15:09:23.080Z        INFO    ingress route is up to date     {"name": "default/nginx"}
2022-07-29T15:12:46.510Z        INFO    ingress route is up to date     {"name": "default/switchboard-ingressroute"}

I've checking by doing kubectl get dnsendpoint -A and its said doesnt have a resource type "dnsendpoint"

@borchero
Copy link
Owner

borchero commented Jul 29, 2022

Can you share your Switchboard configuration? Either your Helm config or your in-cluster config (should be named <release-name>-config).

@mozarik
Copy link
Author

mozarik commented Jul 29, 2022

I'm not configured anything. its all default

Ahh i see. i should configure the nil value right ?

@borchero
Copy link
Owner

Yeah, by default, no integrations are enabled. In your case, you need to enable the dns-endpoint integration and configure it to tell Switchboard where DNS records should point to (e.g. the public IP address of your Traefik service).

@mozarik
Copy link
Author

mozarik commented Jul 29, 2022

Thank you. will update the result

@mozarik
Copy link
Author

mozarik commented Jul 29, 2022

I have question about this value.

# -- The static IP addresses that created DNS records should point to. Must not be provided
#    if the target service is set.
targetIPs: []

I dont undestand it. Is it the external IP of traefik service ?

context: currently i'm running it with MetalLB

The thing that i want to achieve is how do i route some service based on their path

example i have this Ingress

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
 name: nginx-main
 namespace: default
 annotations:
   traefik.ingress.kubernetes.io/router.entrypoints: web
spec:
 rules:
   - host: main-3.example.club
     http:
       paths:
         - path: /main
           pathType: Exact
           backend:
             service:
               name: nginx-deploy-main
               port:
                 number: 80
         - path: /blue
           pathType: Exact
           backend:
             service:
               name: nginx-deploy-blue
               port:
                 number: 80

After i apply it, Cloudflare make the DNS record

time="2022-07-29T16:01:37Z" level=info msg="Changing record." action=CREATE record=main-3.example.club ttl=1 type=A zone=a3304d0368f607eeb0ea5e89d469e36e 

but somehow i cannot access it when i go to main-3.example.club/main or main-3.example.club/blue

But if i put the path to be / in Ingress config i can access nginx-deploy-main on main-3.example.club but cannot access /bluei get the nginx 404 page

nginx 404
image

CLOUDFLARE 404 PAGE if i access with /test or not configure path
image

@borchero
Copy link
Owner

Oh, I really need to improve the documentation there 😅

In general, you only want to set targetIPs if you have a fixed set of IPs that you want to point to (as requested in #10). Typically, you would set targetService and provide the name and namespace of the service of your Traefik instance. If this service has a public IP (e.g. because it is connected to a load balancer), Switchboard will automatically use this IP to create DNS records.

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