K8s Gateway does (virtually?) not receive an IP address

I posted this question already. Or at least I thought I did. Maybe there was a communication issue, maybe something else. Gonna try again...

I'm trying to run RKE2 v1.34.9 (which comes with Traefik 3.7.13) with PureLB and Gateway API-only. Everything works except one thing. The gateway resource does not show an IP address:

kubectl get gateway -A
NAMESPACE     NAME      CLASS     ADDRESS   PROGRAMMED   AGE
kube-system   traefik   traefik             True         40h

Traefik if deployed without creating a managed gateway:

ingressClass:
  enabled: false

gateway:
  enabled: false   # don't create a default gateway

providers:
  kubernetesIngress:
    enabled: false
  kubernetesGateway:
    enabled: true

tlsStore:          # configure a default TLS certificate here
  default:
    defaultCertificate:
      secretName: rancher-guest-tls

The LB service looks like:

apiVersion: v1
kind: Service
metadata:
  labels:
    app.kubernetes.io/name: rke2-traefik
    app.kubernetes.io/instance: rke2-traefik-kube-system
  name: rke2-traefik-controller
  namespace: kube-system
spec:
  type: LoadBalancer
  ports:
    - name: http
      port: 80
      protocol: TCP
      targetPort: web
    - name: https
      port: 443
      protocol: TCP
      targetPort: websecure
  selector:
    app.kubernetes.io/instance: rke2-traefik-kube-system
    app.kubernetes.io/name: rke2-traefik

The result is:

kubectl get svc -A|grep Load
kube-system     rke2-traefik-controller                                           LoadBalancer   10.43.135.24    10.1.1.1   80:31791/TCP,443:31512/TCP   96s

Now I deployed the Traefik whoami app. With a Gateway and HTTPRoute like this

---
apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
  name: traefik
  namespace: kube-system
spec:
  gatewayClassName: traefik
  listeners:
    - name: http
      protocol: HTTP
      port: 8000
      allowedRoutes:
        namespaces:
          from: All
    - name: https
      protocol: HTTPS
      port: 8443
      tls:
        mode: Terminate
        certificateRefs:
          - name: rancher-guest-tls
            namespace: kube-system
      allowedRoutes:
        namespaces:
          from: All
---
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
  name: whoami-http
  namespace: default
spec:
  parentRefs:
    - name: traefik
      sectionName: http
      kind: Gateway
      namespace: kube-system
  hostnames:
    - <some-test-domain-name>
  rules:
    - filters:
        - type: RequestRedirect
          requestRedirect:
            scheme: https
---
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
  name: whoami-https
  namespace: default
spec:
  parentRefs:
    - name: traefik
      sectionName: https
      kind: Gateway
      namespace: kube-system
  hostnames:
    - <some-test-domain-name>
  rules:
    - matches:
        - path:
            type: PathPrefix
            value: /
      backendRefs:
        - name: whoami
          namespace: default
          port: 80

everything is working as expected. The whoami app is reachable over the LB IP, the HTTP URL is redirected, the HTTPS URL works. But still the Gateway does not show an IP address.

Why? Is there anything wrong with the configuration? How to debug? Any hints are highly appreciated.

Hi, The IP will appear at your ingress controller only

No. If you try to configure Gateway API e.g. with Cilium or Calico, the Gateway always shows the IP address.

This is imho either a bug in Traefik or a "wrong" configuration, and I want to find out which of the two.

BTW: I tried the same configuration today, but with Kube-VIP, just to rule out the LB. The same issue happens also with Kube-VIP: The Gateway does not show the IP address.

No. This is completely normal behavior out of the box when using Traefik with the Kubernetes Gateway API.

When you run kubectl get gateway, the ADDRESS column maps directly to the .status.addresses array of the Gateway resource. By default, Traefik does not automatically discover and bind your LoadBalancer service's external IP address to the Gateway status object, leaving it blank.

This may only "completely normal" if you're configuring exactly one LoadBalancer and one Gateway. But how about two LoadBalancers (either behind one or two Trafik instances)? You need two Gateway resources, but what LB is associated with what Gateway? Cilium and Calico handle this correctly by adding the IP address to the Gateway. So, from that point of view, I still think this is a bug in Traefik.

But, since you mention "by default", what about a "non-default" setup? Is Traefik able to handle the scenario of multiple LBs and Gateways? How?

Yes you can setup two ingress controller for traffic isolation, security, resilience and flexibilty. I set it up already for some of my Clients (event in my home labs) and works perfectly with different Gateway ! Cilium and Calico, their primary role is CNI except for Cilium how can act at Layer7 as Ingress Controller

Cilium and Calico both come with Gateway API support (it's both Envoy internally, but that doesn't matter here). And both of them supply the IP address in their Gateway resources.

Yes, I also found that things are working fine without showing the IP address in the Gateway, but, so far, you didn't convince me that this is not a bug. I asked to provide an example config (even non-default) where the IP address is visible in the Gateway resource.

According to API Reference | Gateway API (even though I'm not 100% sure) the IP address MUST be added to the Gateway status.

Any opinion from the Traefik devs?

I found something in another thread, see How to get an IP Address for Gateway API? - #5 by vados

According to that it can be enabled, but only for one(!) service. Fine for now. But what if there are 2 services running on the same Trafik instance?

It's probably working the same way when there are multiple Traefik instances with exactly one LoadBalancer each.

I am not trying to convince you at all ! If you think this is a bug, you should open a ticket at traefik support Team.