Debugging: Traefik 404 on Minikube (Rancher Desktop Port Conflict)#
The Symptom#
After bootstrapping the eu-prod-minikube environment and running minikube tunnel,
all services were Synced and Healthy in ArgoCD. TLS certificates were issued.
Ingresses had EXTERNAL-IP: 127.0.0.1. Yet every request returned 404.
| |
Debugging Layer by Layer#
Layer 1 - Is it an ArgoCD sync problem?#
First check: are all applications actually healthy, or is something not synced?
| |
| |
All healthy. Not a sync problem.
Layer 2 - Do the Ingress and Certificate resources exist?#
| |
| |
Ingresses have ADDRESS: 127.0.0.1. Certificates are READY: True. The cluster
resources look completely healthy.
Layer 3 - Is the connection actually reaching Traefik?#
A plain 404 could mean:
- Nothing is listening on 127.0.0.1:443 (connection refused)
- Something is listening but has no matching route (Traefik’s own 404)
Use verbose curl to see what happens at the TLS layer:
| |
| |
Key finding: TLS handshake succeeds and HTTP/2 404 is returned - something
IS listening and responding. The 404 is from an HTTP server, not a network error.
This rules out the LoadBalancer/routing being broken at the network level.
Check the response body to identify who is returning the 404:
| |
content-type: text/plain; charset=utf-8 with x-content-type-options: nosniff
- this is Traefik’s own 404 response. Traefik is receiving the request, but has no matching router.
Layer 4 - Is Traefik reading the Ingresses?#
Check Traefik logs for startup errors:
| |
| |
Two things to notice:
- The TLS errors are from startup (before cert-manager finished issuing). After
the certs appeared, Traefik logged
Updated ingress status- it IS watching and reading the Ingresses. - Traefik is updating the Ingress
.status.loadBalancer.ingressfield - this confirms it has RBAC and is processing the Ingress objects.
Restart Traefik to force a clean start (certs are now ready):
| |
Layer 5 - Is IngressClass configured correctly?#
| |
| |
IngressClass exists and has the correct controller. The Ingresses reference
ingressClassName: traefik. RBAC check:
| |
RBAC is fine. Traefik can read Ingresses from all namespaces.
Layer 6 - Does the Traefik CRD provider work?#
Standard Kubernetes Ingress uses one provider; Traefik’s own IngressRoute CRD
uses another. Test whether the CRD provider routes correctly:
| |
Even Traefik’s own CRD doesn’t route. This is significant - it means the issue is not specific to the Kubernetes Ingress provider. Traefik is receiving requests but matching no routes at all, regardless of how they are defined.
Try HTTP to rule out TLS-specific problems:
| |
Same 404 on HTTP/port 80. Traefik is not routing ANY request for any prod hostname.
Layer 7 - Is Traefik actually receiving these requests?#
Check what is listening on ports 80 and 443 on the Mac:
| |
| |
There is an SSH process listening on ALL interfaces (*) for both port 80 and 443.
This is not Traefik - this is a system SSH process.
When curl connects to 127.0.0.1:443, it hits this SSH listener, NOT Minikube’s
Traefik. That’s why the TLS handshake works (the SSH process handles TLS) but
every route returns 404 (the SSH process forwards to something that has no routes
for *.eu-prod-minikube.ravikrs.local).
Identify what this SSH process is:
| |
| |
It’s Rancher Desktop’s Lima SSH connection. Rancher Desktop maintains a persistent SSH tunnel to its Lima VM (which runs k3s). That SSH tunnel holds the port 80/443 bindings - forwarding traffic to Rancher Desktop’s own k3s Traefik.
Layer 8 - Why does minikube tunnel assign 127.0.0.1?#
| |
| |
Minikube is using the Docker driver. On macOS, the Docker driver runs Minikube
inside Rancher Desktop’s Docker daemon. minikube tunnel with the Docker driver
assigns 127.0.0.1 as the external IP for LoadBalancer services, expecting Docker’s
port forwarding to handle the routing. But Rancher Desktop’s SSH process already
owns those ports.
Confirm minikube tunnel is running but has no effect on port bindings:
| |
Root cause confirmed: 127.0.0.1:443 → Rancher Desktop SSH → Rancher Desktop
Traefik → no route for *.eu-prod-minikube.ravikrs.local → 404.
Layer 9 - Verify Traefik works when bypassing the LoadBalancer#
Use kubectl port-forward to create a direct tunnel to the Traefik pod through
the Kubernetes API, completely bypassing Docker networking and the LoadBalancer:
| |
200. Traefik was correctly configured all along. The routing was working inside the cluster. The problem was entirely in how traffic from the Mac reached Traefik.
Root Cause Summary#
| |
The conflict:
- Minikube uses Docker driver → assigns
127.0.0.1as LoadBalancer IP - Rancher Desktop holds
*:80and*:443via its Lima SSH tunnel - Both live in the same Docker environment on the same Mac
Fix#
| |
kubectl port-forward routes: Mac → kube-apiserver → Traefik pod.
It bypasses the LoadBalancer, Docker networking, and the port conflict entirely.
Permanent Fix (if standard ports are required)#
Switch Minikube to a VM-based driver that does not share Rancher Desktop’s Docker daemon:
| |
With qemu2, Minikube runs in its own VM with its own network stack. minikube tunnel
creates a proper kernel route to the VM, and port 443 is not contested.
Debugging Instincts Built Here#
| Step | What we checked | What it told us |
|---|---|---|
get applications | ArgoCD sync state | Not a GitOps/sync problem |
get ingress, get certificates | Resource existence | Cluster config is correct |
curl -v | TLS handshake | Something IS listening and responding |
Response body 404 page not found | Who is returning 404 | It’s Traefik’s own 404, not a network error |
| Traefik logs | Startup errors, ingress status updates | Traefik IS reading ingresses |
| IngressRoute CRD test | Is it provider-specific? | No - CRD routes also fail |
| HTTP IngressRoute test | Is it TLS-specific? | No - HTTP also fails |
lsof -i :443 | What owns port 443 | SSH process, not Traefik |
ps -p <pid> | Which SSH process | Rancher Desktop’s Lima tunnel |
minikube profile list | Minikube driver | Docker driver - shares Rancher Desktop |
port-forward test | Does Traefik route correctly? | Yes - config was correct all along |