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.