# Need tip about Ingress /IngressRoute

**URL:** <https://community.traefik.io/t/need-tip-about-ingress-ingressroute/4518>\
**Category:** Traefik v2\
**Tags:** kubernetes-ingress\
**Created:** [February 20, 2020, 9:00am UTC](https://community.traefik.io/t/need-tip-about-ingress-ingressroute/4518 "2020-02-20T09:00:40Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![obeyler](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/obeyler/32/1558_2.png) [@obeyler](https://community.traefik.io/u/obeyler)\
**Post date:** [February 20, 2020, 9:00am UTC](https://community.traefik.io/t/need-tip-about-ingress-ingressroute/4518/1 "2020-02-20T09:00:40Z")

</div>

Could you give me a tip?  
I try to migrate Ingress to IngressRoute. I use the migrate tools.  
Ingress works but IngressRoute doesn't work.  
I suspect the config.toml

```auto
          [global]
            checkNewVersion = true
            sendAnonymousUsage = false

          [log]
            level = "WARNING"

          [api]
            dashboard = true
          [providers]
             [providers.kubernetesingress]
             [providers.kubernetescrd]

          [entrypoints]
            [entrypoints.web]
              address = ":80"
              [entryPoints.web.proxyProtocol]
                 insecure = false
              [entryPoints.web.forwardedHeaders]
                 insecure = true
            [entrypoints.https]
              address = ":443"
            [entryPoints.mysql]
              address = ":3306"
            [entryPoints.mongodb]
              address = ":27017"
            [entryPoints.postgres]
              address = ":5432"

          [tcp] # YAY!
            [tcp.routers]
               [tcp.routers.to-db-1]
                   entrypoints = ["mongodb"]
                   rule = "HostSNI(`*`)"
                   service = "db-1"
          [ping]

          [accesslog]

          [metrics]
            [metrics.prometheus]
               entryPoint = "traefik"
               buckets=[0.1,0.3,1.2,5.0]

```

or the arg of my daemonset:

```auto
              args:
              - --api
              - --providers.kubernetesingress
              - --providers.kubernetescrd
              - --configfile=/config/traefik.toml

```

---

<div class="post-metadata">

**Author:** ![ldez](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/ldez/32/5_2.png) [@ldez](https://community.traefik.io/u/ldez)\
**Post date:** [February 20, 2020, 1:13pm UTC](https://community.traefik.io/t/need-tip-about-ingress-ingressroute/4518/2 "2020-02-20T13:13:58Z")

</div>

> [@obeyler](#):
>
> ```auto
> args:
> - --api
> - --providers.kubernetesingress
> - --providers.kubernetescrd
> - --configfile=/config/traefik.toml
> 
> ```

Note that `--configfile` and other flag cannot be mixed.  
Either you use a file (with or without `--configfile`) or you use flags.

> **[Traefik Configuration Documentation - Traefik](https://doc.traefik.io/traefik/v2.1/getting-started/configuration-overview/)**
>
> Get started with Traefik Proxy. This page will introduce you to the dynamic routing and startup configurations. Read the technical documentation.

Could you provide your ingress, ingresstoute, logs, ...

---

<div class="post-metadata">

**Author:** ![obeyler](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/obeyler/32/1558_2.png) [@obeyler](https://community.traefik.io/u/obeyler)\
**Post date:** [February 20, 2020, 2:43pm UTC](https://community.traefik.io/t/need-tip-about-ingress-ingressroute/4518/3 "2020-02-20T14:43:38Z")

</div>

this by example this ingressroute doesn't work

```auto
      apiVersion: traefik.containo.us/v1alpha1
      kind: IngressRoute
      metadata:
        name: k8sdash-ingressroute
        namespace: kube-system
      spec:
        entryPoints:
        - web
        routes:
        - match: Host(`k8sdash.k8s-master`) && PathPrefix(`/`)
          kind: Rule
          priority: 0
          services:
          - kind: Service
            name: k8sdash
            namespace: kube-system
            port: 80

```

versus this ingress works fine:

```auto
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  annotations:
    kubernetes.io/ingress.class: traefik
  name: k8sdash-ingress
  namespace: kube-system
spec:
  rules:
  - host: k8sdash.k8s-master
    http:
      paths:
      - backend:
          serviceName: k8dash
          servicePort: 80
        path: /

```

---

<div class="post-metadata">

**Author:** ![obeyler](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/obeyler/32/1558_2.png) [@obeyler](https://community.traefik.io/u/obeyler)\
**Post date:** [February 20, 2020, 3:17pm UTC](https://community.traefik.io/t/need-tip-about-ingress-ingressroute/4518/4 "2020-02-20T15:17:13Z")

</div>

kubectl logs -n traefik traefik-ingress-controller-28xpq

```auto
time="2020-02-20T15:09:17Z" level=info msg="Configuration loaded from file: /config/traefik.toml"
time="2020-02-20T15:09:17Z" level=info msg="Traefik version 2.1.4 built on 2020-02-06T17:10:06Z"
time="2020-02-20T15:09:17Z" level=info msg="Starting provider aggregator.ProviderAggregator {}"
time="2020-02-20T15:09:17Z" level=info msg="Starting provider *ingress.Provider {}"
time="2020-02-20T15:09:17Z" level=info msg="ingress label selector is: \"\"" providerName=kubernetes
time="2020-02-20T15:09:17Z" level=info msg="Creating in-cluster Provider client" providerName=kubernetes
time="2020-02-20T15:09:17Z" level=info msg="Starting provider *traefik.Provider {}"
time="2020-02-20T15:09:17Z" level=info msg="Starting provider *crd.Provider {}"
time="2020-02-20T15:09:17Z" level=info msg="label selector is: \"\"" providerName=kubernetescrd
time="2020-02-20T15:09:17Z" level=info msg="Creating in-cluster Provider client" providerName=kubernetescrd
time="2020-02-20T15:09:18Z" level=error msg="Error while reading basic auth middleware: failed to load auth credentials: secret 'traefik/traefik' not found" middlewareName=traefik-auth providerName=kubernetescrd
time="2020-02-20T15:09:18Z" level=error msg="middleware \"traefik-auth@kubernetescrd\" does not exist" entryPointName=mongodb routerName=traefik-traefik-86717a050e7497cf6af6@kubernetescrd
time="2020-02-20T15:09:18Z" level=error msg="middleware \"traefik-auth@kubernetescrd\" does not exist" entryPointName=mysql routerName=traefik-traefik-86717a050e7497cf6af6@kubernetescrd
time="2020-02-20T15:09:18Z" level=error msg="middleware \"traefik-auth@kubernetescrd\" does not exist" entryPointName=postgres routerName=traefik-traefik-86717a050e7497cf6af6@kubernetescrd
time="2020-02-20T15:09:18Z" level=error msg="middleware \"traefik-auth@kubernetescrd\" does not exist" entryPointName=web routerName=traefik-traefik-86717a050e7497cf6af6@kubernetescrd
time="2020-02-20T15:09:18Z" level=error msg="middleware \"traefik-auth@kubernetescrd\" does not exist" entryPointName=https routerName=traefik-traefik-86717a050e7497cf6af6@kubernetescrd
time="2020-02-20T15:09:18Z" level=error msg="middleware \"traefik-auth@kubernetescrd\" does not exist" entryPointName=traefik routerName=traefik-traefik-86717a050e7497cf6af6@kubernetescrd
192.168.245.205 - admin [20/Feb/2020:15:09:55 +0000] "GET /api/overview HTTP/1.1" 200 372 "-" "-" 1 "traefik-traefik-86717a050e7497cf6af6@kubernetescrd" - 0ms
192.168.245.205 - admin [20/Feb/2020:15:10:15 +0000] "GET /api/overview HTTP/1.1" 200 372 "-" "-" 2 "traefik-traefik-86717a050e7497cf6af6@kubernetescrd" - 0ms

```

---

<div class="post-metadata">

**Author:** ![obeyler](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/obeyler/32/1558_2.png) [@obeyler](https://community.traefik.io/u/obeyler)\
**Post date:** [February 21, 2020, 12:32pm UTC](https://community.traefik.io/t/need-tip-about-ingress-ingressroute/4518/5 "2020-02-21T12:32:00Z")

</div>

@ldez I've also created an issue ([https://github.com/containous/traefik/issues/6349](https://github.com/containous/traefik/issues/6349)) about the log of Error while reading basic auth middleware: failed to load auth credentials
