Hi all,
We're trying to configure Traefik to route HTTP traffic to an external IP using a headless Kubernetes service with manually defined Endpoints. However, we're getting a 503 no available server
error when trying to access the service via the domain.
Our current setup is:
- Traefik
v3.3.3
(installed via Helm chart) - kubernetes
v1.32
.
We want to forward requests to http://a.example.com
(pointing to Traefik's NLB) to an external IP (X.X.X.X
) that is reachable from within the cluster.
The service configuration is the following:
Traefik IngressRoute
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
annotations:
kubernetes.io/ingress.class: my-traefik
name: my-ingress-route
spec:
routes:
- kind: Rule
match: Host(`a.example.com`) # This points to the traefik NLB DNS record
services:
- kind: Service
name: my-service
port: 80
Headless Service
apiVersion: v1
kind: Service
metadata:
name: my-service
spec:
clusterIP: None
ports:
- name: http
port: 80
protocol: TCP
targetPort: 80
type: ClusterIP
Endpoint
apiVersion: v1
kind: Endpoints
metadata:
name: my-service # Same name as the headless service.
subsets:
- addresses:
- ip: X.X.X.X # This IP is reachable.
ports:
- port: 80
Observations
- Doing a
kubectl port-forward
to the headless service works fine - The Traefik dashboard shows the router and service correctly created.
- Access logs are enabled, and log level is set to
DEBUG
, but we don't see any specific error messages — just the 503. - We are not using
ExternalName
because we want to use a static IP. - We can see the in the metrics the request in the entrypoint but not in the service
Any tips on how to debug or troubleshoot this would be greatly appreciated.
Thanks in advance!