<p>I have been trying to run traefik v2.x in minikube to check it and how it routes request to needed service. I am  failing to get access to my services at all. would be good to understand what I am doing wrong.</p>
<ul>
<li>minikube is running in VirtualBox VM</li>
<li>VM box has lab IP address to which I want to send URL request</li>
<li>on my localhost I set hosts (<code>mydomain.local</code> and <code>mydomain.com</code>) to IP address of minikube VM</li>
</ul>
<p><a href="https://i.stack.imgur.com/wezun.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wezun.png" alt="enter image description here" /></a></p>
<p>How to reproduce:</p>
<ol>
<li>create 2 namespaces <code>new-ns</code> and <code>new-who</code></li>
<li>set namespace to be default for Ingress: <code>kubectl config set-context --current --namespace=new-ns</code></li>
</ol>
<p>All yaml files can be found in <a href="https://github.com/vencrena-LT/traefik" rel="nofollow noreferrer">https://github.com/vencrena-LT/traefik</a></p>
<ol start="3">
<li>deploy CustomResourceDefinition</li>
<li>deploy ClusterRole , ClusterRoleBinding and ServiceAccount (to new-ns namespace)</li>
<li>deploy DaemonSet and Service (to new-ns namespace)</li>
</ol>
<p>then would like to deploy 2 apps: in both namespaces (for testing purposes)</p>
<ol>
<li>Deployment, Service and IngressRoute to new-ns namespace</li>
<li>Deployment, Service and IngressRoute to new-new namespace</li>
</ol>
<p>Dashboard:
<a href="https://i.stack.imgur.com/Tbmm4.jpg?s=10" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Tbmm4.jpg?s=10" alt="enter image description here" /></a>
Routes:
<a href="https://i.stack.imgur.com/iSa8t.jpg?s=10" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/iSa8t.jpg?s=10" alt="enter image description here" /></a>
LocalPod:
<a href="https://i.stack.imgur.com/HfHo3.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HfHo3.jpg" alt="enter image description here" /></a></p>
<p>some logs from traefik pod:</p>
<pre><code>E0206 08:25:21.798628       1 reflector.go:127] pkg/mod/k8s.io/client-go@v0.19.2/tools/cache/reflector.go:156: Failed to watch *v1alpha1.TLSStore: failed to list 
*v1alpha1.TLSStore: tlsstores.traefik.containo.us is forbidden: User &quot;system:serviceaccount:new-ns:traefik-ingress-controller&quot; cannot list resource &quot;tlsstores&quot; in API group &quot;traefik.containo.us&quot; at the cluster scope

E0206 08:25:34.653633       1 reflector.go:127] pkg/mod/k8s.io/client-go@v0.19.2/tools/cache/reflector.go:156: Failed to watch *v1alpha1.ServersTransport: failed to list
*v1alpha1.ServersTransport: serverstransports.traefik.containo.us is forbidden: User &quot;system:serviceaccount:new-ns:traefik-ingress-controller&quot; cannot list resource &quot;serverstransports&quot; in API group &quot;traefik.containo.us&quot; at the cluster scope

E0206 08:26:02.857094       1 reflector.go:127] pkg/mod/k8s.io/client-go@v0.19.2/tools/cache/reflector.go:156: Failed to watch *v1alpha1.IngressRouteUDP: failed to list
*v1alpha1.IngressRouteUDP: ingressrouteudps.traefik.containo.us is forbidden: User &quot;system:serviceaccount:new-ns:traefik-ingress-controller&quot; cannot list resource &quot;ingressrouteudps&quot; in API group &quot;traefik.containo.us&quot; at the cluster scope
</code></pre>
<p>any <strong>hints</strong> what I am doing wrong? why can not access <code>mydomain.local</code> and <code>mydomain.com</code> and see whoami services. why no routes are seen in Traefik dashboard</p>

<p>Your ClusterRole definition is a bit too thin:</p>
<p><a href="https://github.com/vencrena-LT/traefik/blob/main/2_roles.yml" rel="nofollow noreferrer">https://github.com/vencrena-LT/traefik/blob/main/2_roles.yml</a></p>
<p>You could try to follow the example here:</p>
<p><a href="https://github.com/sleighzy/k3s-traefik-v2-kubernetes-crd" rel="nofollow noreferrer">https://github.com/sleighzy/k3s-traefik-v2-kubernetes-crd</a></p>
<p>For the question why no routes are seen:
Traefik will pickup from k8s routes when you specify</p>
<pre><code>        - --providers.kubernetescrd
        - --providers.kubernetesingress
</code></pre>
<p>Also please be aware of the namespace where traefik resides, you will apply IngressRoutes on that namespace</p>
