Failed to watch XXXX: failed to list XXXX: Unauthorized

Apply for resource distribution: Traefik CRD TLS Documentation - Traefik -resources

error:

to watch *v1alpha1.MiddlewareTCP: failed to list *v1alpha1.MiddlewareTCP: Unauthorized
E0426 01:52:48.525337       1 reflector.go:138] k8s.io/client-go@v0.22.1/tools/cache/reflector.go:167: Failed to watch *v1alpha1.IngressRouteUDP: failed to list *v1alpha1.IngressRouteUDP: Unauthorized
E0426 01:52:56.137372       1 reflector.go:138] k8s.io/client-go@v0.22.1/tools/cache/reflector.go:167: Failed to watch *v1alpha1.TLSStore: failed to list *v1alpha1.TLSStore: Unauthorized
E0426 01:53:00.808740       1 reflector.go:138] k8s.io/client-go@v0.22.1/tools/cache/reflector.go:167: Failed to watch *v1alpha1.TraefikService: failed to list *v1alpha1.TraefikService: Unauthorized
E0426 01:53:00.919163       1 reflector.go:138] k8s.io/client-go@v0.22.1/tools/cache/reflector.go:167: Failed to watch *v1alpha1.IngressRouteTCP: failed to list *v1alpha1.IngressRouteTCP: Unauthorized
E0426 01:53:08.172808       1 reflector.go:138] k8s.io/client-go@v0.22.1/tools/cache/reflector.go:167: Failed to watch *v1.Service: failed to list *v1.Service: Unauthorized
E0426 01:53:15.363379       1 reflector.go:138] k8s.io/client-go@v0.22.1/tools/cache/reflector.go:167: Failed to watch *v1.Secret: failed to list *v1.Secret: Unauthorized
E0426 01:53:18.228407       1 reflector.go:138] k8s.io/client-go@v0.22.1/tools/cache/reflector.go:167: Failed to watch *v1.Endpoints: failed to list *v1.Endpoints: Unauthorized
E0426 01:53:19.906919       1 reflector.go:138] k8s.io/client-go@v0.22.1/tools/cache/reflector.go:167: Failed to watch *v1alpha1.ServersTransport: failed to list *v1alpha1.ServersTransport: Unauthorized
E0426 01:53:21.527947       1 reflector.go:138] k8s.io/client-go@v0.22.1/tools/cache/reflector.go:167: Failed to watch *v1alpha1.TLSOption: failed to list *v1alpha1.TLSOption: Unauthorized
E0426 01:53:24.118726       1 reflector.go:138] k8s.io/client-go@v0.22.1/tools/cache/reflector.go:167: Failed to watch *v1alpha1.MiddlewareTCP: failed to list *v1alpha1.MiddlewareTCP: Unauthorized
E0426 01:53:27.264692       1 reflector.go:138] k8s.io/client-go@v0.22.1/tools/cache/reflector.go:167: Failed to watch *v1alpha1.Middleware: failed to list *v1alpha1.Middleware: Unauthorized
E0426 01:53:28.534354       1 reflector.go:138] k8s.io/client-go@v0.22.1/tools/cache/reflector.go:167: Failed to watch *v1alpha1.IngressRouteUDP: failed to list *v1alpha1.IngressRouteUDP: Unauthorized
E0426 01:53:36.273536       1 reflector.go:138] k8s.io/client-go@v0.22.1/tools/cache/reflector.go:167: Failed to watch *v1alpha1.IngressRoute: failed to list *v1alpha1.IngressRoute: Unauthorized
E0426 01:53:43.769976       1 reflector.go:138] k8s.io/client-go@v0.22.1/tools/cache/reflector.go:167: Failed to watch *v1.Service: failed to list *v1.Service: Unauthorized
E0426 01:53:51.203929       1 reflector.go:138] k8s.io/client-go@v0.22.1/tools/cache/reflector.go:167: Failed to watch *v1alpha1.TLSStore: failed to list *v1alpha1.TLSStore: Unauthorized
E0426 01:53:52.088043       1 reflector.go:138] k8s.io/client-go@v0.22.1/tools/cache/reflector.go:167: Failed to watch *v1alpha1.IngressRouteTCP: failed to list *v1alpha1.IngressRouteTCP: Unauthorized
E0426 01:53:55.944247       1 reflector.go:138] k8s.io/client-go@v0.22.1/tools/cache/reflector.go:167: Failed to watch *v1alpha1.MiddlewareTCP: failed to list *v1alpha1.MiddlewareTCP: Unauthorized
E0426 01:53:56.559599       1 reflector.go:138] k8s.io/client-go@v0.22.1/tools/cache/reflector.go:167: Failed to watch *v1alpha1.TraefikService: failed to list *v1alpha1.TraefikService: Unauthorized
E0426 01:53:59.105051       1 reflector.go:138] k8s.io/client-go@v0.22.1/tools/cache/reflector.go:167: Failed to watch *v1.Endpoints: failed to list *v1.Endpoints: Unauthorized
E0426 01:54:00.121172       1 reflector.go:138] k8s.io/client-go@v0.22.1/tools/cache/reflector.go:167: Failed to watch *v1alpha1.Middleware: failed to list *v1alpha1.Middleware: Unauthorized
E0426 01:54:00.166382       1 reflector.go:138] k8s.io/client-go@v0.22.1/tools/cache/reflector.go:167: Failed to watch *v1alpha1.ServersTransport: failed to list *v1alpha1.ServersTransport: Unauthorized

/ # traefik version
Version:      2.6.3
Codename:     rocamadour
Go version:   go1.17.8
Built:        2022-03-29T13:09:27Z
OS/Arch:      linux/amd64
[root@k8s-master1 test]# kubectl get pod 
NAME                      READY   STATUS    RESTARTS   AGE
traefik-c475bb9b-lqnhm    1/1     Running   0          29m
whoami-5b69cdcd49-45hf7   1/1     Running   0          29m
whoami-5b69cdcd49-62rd7   1/1     Running   0          29m
[root@k8s-master1 test]# kubectl version
Client Version: version.Info{Major:"1", Minor:"23", GitVersion:"v1.23.6", GitCommit:"ad3338546da947756e8a88aa6822e9c11e7eac22", GitTreeState:"clean", BuildDate:"2022-04-14T08:49:13Z", GoVersion:"go1.17.9", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"23", GitVersion:"v1.23.6", GitCommit:"ad3338546da947756e8a88aa6822e9c11e7eac22", GitTreeState:"clean", BuildDate:"2022-04-14T08:43:11Z", GoVersion:"go1.17.9", Compiler:"gc", Platform:"linux/amd64"}

Hello @xiansen,

Can you provide a complete, step-by-step, guide on how to reproduce your issue ?

But I'm at kubernetes 1.20 Version test traefik can run normally and open the dashboard

kubelet apply CRD-resources https://doc.traefik.io/traefik/user-guides/crd-acme/#ingressroute-definition
kubelet apply Service-resources https://doc.traefik.io/traefik/user-guides/crd-acme/#services
kubelet apply Deployment https://doc.traefik.io/traefik/user-guides/crd-acme/#deployments
perhaps

helm repo add traefik https://helm.traefik.io/traefik
helm repo update
helm install traefik traefik/traefik

The pod container is running, and 404 status code appears when accessing the dashboard of treafik.
Kubernetes is version 1.23.6 installed with Binaries source code.
The traefik container log information is as above.Thank you for your answer