Traefik Converter
mdminhazulhaque/traefik-converter
IngressRoute
To Ingress
apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: app namespace: prod spec: entryPoints: - web - websecure routes: # Test multiple hosts - kind: Rule match: Host(`alice.example.com`, `bob.example.com`, `charlie.example.com`) services: - name: common-service port: http # Test single host - kind: Rule match: Host(`standalone.example.com`) services: - name: standalone port: http # Test port name vs number - kind: Rule match: Host(`port.example.com`) services: - name: port port: 8080 # Test single host with multiple paths - kind: Rule match: Host(`api.example.com`) && Path(`/health`) services: - name: health port: http - kind: Rule match: Host(`api.example.com`) && PathPrefix(`/auth`) services: - name: auth port: http - kind: Rule match: Host(`api.example.com`) && PathPrefix(`/`) services: - name: home port: http
Ingress
To IngressRoute
apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: app namespace: prod spec: rules: # Test multiple hosts - host: alice.example.com http: paths: - path: / pathType: Prefix backend: service: name: common-service port: name: http - host: bob.example.com http: paths: - path: / pathType: Prefix backend: service: name: common-service port: name: http - host: charlie.example.com http: paths: - path: / pathType: Prefix backend: service: name: common-service port: name: http # Test single host - host: standalone.example.com http: paths: - path: / pathType: Prefix backend: service: name: standalone port: name: http # Test port name vs number - host: port.example.com http: paths: - path: / pathType: Prefix backend: service: name: port port: number: 8080 # Test single host with multiple paths - host: api.example.com http: paths: - path: /health pathType: Exact backend: service: name: /health port: name: http - path: /auth pathType: Prefix backend: service: name: auth port: name: http - path: / pathType: Prefix backend: service: name: home port: name: http