Basic K8s Ingress example

Hi @mojo,

The HelmChart rely on the CRD provider by default.
From here you have two options to make your example work:

  • Activate the Kubernetes Ingress provider:

When installing the Traefik HelmChart, you must provide a values file as follow:

helm install --namespace traefik traefik traefik/traefik --values values.yaml

And here is the content of the values file:

# values.yaml
additionalArguments:
  - "--providers.kubernetesIngress"
  • Work with IngressRoute CRD:

Replace the Ingress by an IngressRoute resource:

---
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
  name: myingressroute
spec:
  entryPoints:
    - web
  routes:
    - match: Host(`localhost`) && Path(`/foo`)
      kind: Rule
      services:
        - name: whoami
          port: 80
    - match: Host(`localhost`) && Path(`/bar`)
      kind: Rule
      services:
        - name: whoami
          port: 80