I've updated traefik from v2.10 to 3.0-beta5 and it can't find my HTTPRoute anymore.
kubectl auth can-i list middlewares --as=system:serviceaccount:traefik:traefik-controller
yes
kubectl auth can-i list gateways --as=system:serviceaccount:traefik:traefik-controller
yes
kubectl auth can-i list httproute --as=system:serviceaccount:traefik:traefik-controller
yes
kubectl auth can-i list gatewayclasses --as=system:serviceaccount:traefik:traefik-controller
Warning: resource 'gatewayclasses' is not namespace scoped in group 'gateway.networking.k8s.io'
yes
I have nothing special in logs except the warnings links to v1alpha2.
I destroyed the whole traefik namespace, I've deleted my HTTPRoute and Traefik does not see it.
UPDATE 1 :
There is a problem with the GatewayClass
kubectl -n traefik describe gatewayclass traefik
Name: traefik
Namespace:
Labels: app.kubernetes.io/instance=traefik
app.kubernetes.io/name=traefik
Annotations: <none>
API Version: gateway.networking.k8s.io/v1
Kind: GatewayClass
Metadata:
Creation Timestamp: 2023-12-05T10:19:00Z
Generation: 1
Resource Version: 35221333623
UID: ffce3454-bff5-423c-b1bd-c56c66d8f047
Spec:
Controller Name: traefik.io/gateway-controller
Status:
Conditions:
Last Transition Time: 1970-01-01T00:00:00Z
Message: Waiting for controller
Reason: Waiting
Status: Unknown
Type: Accepted
Events: <none>
Providers are available
Here is how I configured Traefik (this was working for v2.10)
---
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: traefik
namespace: traefik
labels:
app.kubernetes.io/name: traefik
app.kubernetes.io/instance: traefik
spec:
selector:
matchLabels:
app.kubernetes.io/name: traefik
app.kubernetes.io/instance: traefik
template:
metadata:
labels:
app.kubernetes.io/name: traefik
app.kubernetes.io/instance: traefik
spec:
serviceAccountName: traefik-controller
terminationGracePeriodSeconds: 60
hostNetwork: false
containers:
- name: traefik
image: traefik:v3.0.0-beta5
resources:
readinessProbe:
httpGet:
path: /ping
port: 9000
failureThreshold: 1
initialDelaySeconds: 10
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 5
livenessProbe:
httpGet:
path: /ping
port: 9000
failureThreshold: 3
initialDelaySeconds: 10
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 5
ports:
- name: "traefik"
containerPort: 9000
protocol: TCP
- name: "web"
hostPort: 80
containerPort: 8000
protocol: TCP
- name: "websecure"
hostPort: 443
containerPort: 8443
protocol: TCP
securityContext:
capabilities:
drop:
- ALL
add:
- NET_BIND_SERVICE
readOnlyRootFilesystem: true
runAsGroup: 65532
runAsNonRoot: true
runAsUser: 65532
volumeMounts:
- name: data
mountPath: /data
args:
- "--global.checknewversion"
- "--entryPoints.traefik.address=:9000"
- "--entryPoints.web.address=:8000"
- "--entryPoints.websecure.address=:8443"
- "--api.dashboard=true"
- "--ping=true"
- "--providers.kubernetescrd"
- "--providers.kubernetesingress"
- "--entrypoints.websecure.http.tls"
- "--providers.kubernetescrd.allowCrossNamespace=true"
- "--experimental.kubernetesgateway=true"
- "--providers.kubernetesgateway=true"
volumes:
- name: data
emptyDir: {}
securityContext:
fsGroup: 65532
Any idea on what can be done to investigate this issue ?
Thanks