Missing Traefik Middleware reference in IngressRoute

Traefik Middlewares are used to customize the API Gateway behavior. Middlewares are referenced from IngressRoute. This validator detects a condition when the Middleware referenced in the IngressRoute is not found.

Affected Resources: IngressRoute

Examples

apiVersion: traefik.containo.us/v1alpha1 kind: IngressRoute metadata: name: whoami spec: entryPoints: - web routes: - kind: Rule match: Host(`demo.kubevious.io`) middlewares: - name: samples-security@kubernetescrd # Middleware not found in the namespace "samples" namespace: samples - name: redirect # Middleware not found in same namespace services: - kind: Service name: whoami-svc port: 80
apiVersion: traefik.containo.us/v1alpha1 kind: Middleware metadata: name: redirect spec: redirectScheme: permanent: true scheme: https

Resolution

  • Check if the Middleware is present in the same namespace.
  • Check if the Middleware is present in the namespace specified by the namespace field.
  • Did you make a typo in the IngressRoute? Kubevious Search uses fuzzy logic to return results and can help with finding the correct Middleware.
  • Need other validation rules?

    Please let us know if there are other built-in validation rules you would like to see in Kubevious to detect misconfigurations and violations to best practices. Optionally, you can provide your details so we can reach out to you with follow-up questions.

    Share this article on:
    message