<p>I'm trying to deploy traefik in Kubernetes with minikube. The deployment works well, the pod starts but when I look into pod logs, I get this :</p>
<pre><code>Failed to list *v1beta1.Ingress: the server could not find the requested resource (get ingresses.extensions)
</code></pre>
<p>My current kubectl &amp; kubernetes server versions are :</p>
<pre><code>kubectl version
Client Version: version.Info{Major:&quot;1&quot;, Minor:&quot;22&quot;, GitVersion:&quot;v1.22.1&quot;, GitCommit:&quot;632ed300f2c34f6d6d15ca4cef3d3c7073412212&quot;, GitTreeState:&quot;clean&quot;, BuildDate:&quot;2021-08-19T15:45:37Z&quot;, GoVersion:&quot;go1.16.7&quot;, Compiler:&quot;gc&quot;, Platform:&quot;linux/amd64&quot;}
Server Version: version.Info{Major:&quot;1&quot;, Minor:&quot;22&quot;, GitVersion:&quot;v1.22.1&quot;, GitCommit:&quot;632ed300f2c34f6d6d15ca4cef3d3c7073412212&quot;, GitTreeState:&quot;clean&quot;, BuildDate:&quot;2021-08-19T15:39:34Z&quot;, GoVersion:&quot;go1.16.7&quot;, Compiler:&quot;gc&quot;, Platform:&quot;linux/amd64&quot;
</code></pre>
<p>The version of traefik image that I try to deploy : <strong>traefik:v2.0</strong></p>
<p>I set up all the RBAC resources and my current configuration for traefik is :</p>
<pre><code>apiVersion: networking.k8s.io/v1
kind: IngressClass
metadata:
  name: traefik-lb
spec:
  controller: traefik.io/ingress-controller
---
apiVersion: &quot;networking.k8s.io/v1&quot;
kind: &quot;Ingress&quot;
metadata:
  name: &quot;example-ingress&quot;
spec:
  ingressClassName: &quot;traefik-lb&quot;
  rules:
  - host: &quot;*.example.com&quot;
    http:
      paths:
      - path: &quot;/example&quot;
        pathType: Exact
        backend:
          service:
            name: &quot;rabbitmq&quot;
            port:
                number: 32666
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: traefik-ingress-controller
rules:
  - apiGroups: [&quot;&quot;]
    resources: [services, endpoints]
    verbs: [list, watch]
  - apiGroups: [extensions]
    resources: [ingresses]
    verbs: [list]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: traefik-ingress-controller
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: traefik-ingress-controller
subjects:
- kind: ServiceAccount
  name: {{ include &quot;traefik.serviceAccountName&quot; . }}
  namespace: default
</code></pre>
<p>The command api-versions result :</p>
<pre><code>d3vpasha@d3vpasha-ZenBook-UX425EA-UX425EA ~/helm-charts/charts/traefik (dev)$ kubectl api-versions
admissionregistration.k8s.io/v1
apiextensions.k8s.io/v1
apiregistration.k8s.io/v1
apps/v1
authentication.k8s.io/v1
authorization.k8s.io/v1
autoscaling/v1
autoscaling/v2beta1
autoscaling/v2beta2
batch/v1
batch/v1beta1
certificates.k8s.io/v1
coordination.k8s.io/v1
discovery.k8s.io/v1
discovery.k8s.io/v1beta1
events.k8s.io/v1
events.k8s.io/v1beta1
flowcontrol.apiserver.k8s.io/v1beta1
networking.k8s.io/v1
node.k8s.io/v1
node.k8s.io/v1beta1
policy/v1
policy/v1beta1
rbac.authorization.k8s.io/v1
scheduling.k8s.io/v1
storage.k8s.io/v1
storage.k8s.io/v1beta1
v1
</code></pre>
<p>I don't see what I do wrong :/ if someone can help me, thank you in advance</p>
<p>EDIT : I would like to add the fact that traefik:2.5 has not this problem so it's something related to the version 2.0 of traefik...</p>

<p>You might want to look at a lot of examples that I have done for the same <a href="https://github.com/codeaprendiz/devops-essentials/tree/main/home/container-orchestration/kubernetes" rel="nofollow noreferrer">here</a></p>
<p>Try <a href="https://github.com/codeaprendiz/devops-essentials/tree/main/home/container-orchestration/kubernetes/practice-tasks/task-aws-010-deploy-treafik-kops-k8s-helm" rel="nofollow noreferrer">this</a>. You might need to change the service type from LoadBalancer to ClusterIP.</p>
<p>This might help as well <a href="https://github.com/codeaprendiz/devops-essentials/tree/main/home/container-orchestration/kubernetes/practice-tasks/task-gcp-023-traefik-whoami" rel="nofollow noreferrer">traefik-whoami</a></p>
<p>Try using helm for generating resources. Its much more convenient to manage.
You can always generate the k8s-manifests if something is wrong.</p>
