#12500·traefik

Gateway API: multiple Gateways backed by different Services with different IPs/hostnames

Author: daggazCreated Jan 2, 2026Updated Sep 17, 2026
Labelsarea/provider/k8s/gatewayapi

Welcome!

  • Yes, I've searched similar issues on GitHub and didn't find any.
  • Yes, I've searched similar issues on the Traefik community forum and didn't find any.

What did you expect to see?

This is related to #12076 but I think more general in scope.

Summary

When running Traefik as a Kubernetes Gateway API controller with multiple Gateway objects, Traefik currently reports the same address in .status.addresses for all Gateways, as configured statically through the providers.kubernetesGateway. statusAddress.* CLI arguments.

For example if traefik is configured with:

--providers.kubernetesgateway.statusaddress.service.name=bar
--providers.kubernetesgateway.statusaddress.service.namespace=foo

It will determine the status addresses for all Gateways using the IP of that one named Service. The same is true for the hostname/ip options.

This means we cannot create a 2nd Gateway (e.g. internal and public) and have them appear on different IPs.

For example, I have configured traefik with two entrypoints (websecure:8443 and public:8444) that are exposed via different Services or type LoadBalancer (mapped to 443 on each external IP), but I cannot create two Gateway configurations, each referencing 8443 and 8444 respectively, and get the non-statically-configured IP of the corresponding services.

The Gateway API explicitly supports:

  • Multiple Gateways per cluster
  • Different exposure models (internal, public, edge, etc.)
  • Distinct addresses per Gateway

Observed context

  • Traefik runs once (DaemonSet or Deployment)
  • Multiple LoadBalancer Services front the same pods:
    • Service/traefik: 443 -> 8443
    • Service/traefik-public: 443 -> 8444
  • Multiple entryPoints exist:
    • websecure: 8443
    • public: 8444
  • Multiple Gateways:
    • internal: port 8443
    • public: port 8444

Traefik already has access to:

  • Gateway listener ports
  • EntryPoint configuration
  • Service definitions and selectors

so should have enough information to lookup the correct Service (correct labels and targetport) and publish that Service's IP(s) as the Gateway address.

Relevant code

Gateway status addresses are currently derived from a single configured Service:

Proposed solution (opt-in, non-breaking)

Introduce an optional, per-Gateway address resolution mode that derives addresses by matching Gateway listeners to Services.

Suggested behaviour

For each Gateway:

  1. For each listener:
    • Identify Services that:
      • Select Traefik pods
      • Expose a port whose targetPort (or resolved named port) matches the listener port
  2. If one or more Services matches:
    • Use those Services' external address in Gateway.status.addresses
  3. If zero matchs:
    • Fallback to static configuration?

Gate this behind an explicit flag, for example:

--providers.kubernetesgateway.statusaddress.service.auto=true