How to define entrypoint in IngressRoute

I'm trying to define an entrypoint but the reflector gives me an unable to decode error for the following:

apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
  name: test-jokebot
  namespace: test
spec:
  entryPoints:
    rasa:
      address: ":5005"
  routes:
  - match: Host(`host.com`) && PathPrefix(`/webhooks/rest/webook`)
    kind: Rule
    scheme: http
    services:
    - name: rasa
      port: 5005

Here's the full error:

watch of *v1alpha1.IngressRoute ended with: an error on the server ("unable to decode an event from the watch stream: unable to decode watch event: 
  v1alpha1.IngressRoute.Spec: 
    v1alpha1.IngressRouteSpec.EntryPoints: []string: decode slice: expect [ or n, but found {, error found in #10 byte of ...|yPoints\":{\"rasa|..., bigger context ...|5-497d-97b7-e18a607541fe\"},\"spec\":{\"entryPoints\":{\"rasa\":{\"address\":\":5005\"}},\"routes\":[{\"kind\"|...") has prevented the request from succeeding

Hello @rgstephens

Thanks for using Traefik.

The entrypoint is a list, so you need to create in the following way

spec:
  entryPoints:
    - foo

The IP address and the port is part of static configuration so it can be defined in a file using file provider ar as CLI argument to Traefik binary.

Here is the documentation for Ingressroute: Kubernetes IngressRoute - Traefik and to the entrypoint: EntryPoints - Traefik

Thank you,

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.