Hi,
I'm a newbie in Traefik configuration. I successfully configured Traefik to route some test services on Docker, including LetsEncrypt certificates.
Now I need to migrate this configuration to my on-premise Kubernetes cluster, but I'm not sure which configuration to choose. There are Kubernetes IngressRoute, Kubernetes Ingress, Kubernetes GatewayAPI options in the Traefik documentation:
- The GatewayAPI is experimental so it dropped out from my R&D.
- The IngressRoute is compatible with Kubernetes v.1.16. I got an error message
apiextensions.k8s.io/v1beta1 customresourcedefinition is deprecated in v1.16+ unavailable in v1.22+
The current Kubernetes version is 1.21, The version 1.16 was issued in 2019... I tried to fix the error which Kubernetes responded after deploying the example code from the documentation, but I got another errors..
- The Ingress example looks much better, but I couldn't find how I can apply dynamic configuration to the apps so they can be automatically handled by Traefik. As I can see in the Ingress component, the routing is hard-coded:
kind: Ingress
apiVersion: extensions/v1beta1
metadata:
name: "foo"
namespace: production
spec:
rules:
- host: example.net
http:
paths:
- path: /bar
backend:
serviceName: service1
servicePort: 80
- path: /foo
backend:
serviceName: service1
servicePort: 80
The sample above is part of Traefik documentation, not compatible with the current Kubernetes but after some refactoring it works.
I also testes some Helm charts to install all required components, but there were a lot of warnings and error again.
My questions are:
- Which is the best Kubernetes configuration?
- Are there any good tutorial, blog post or working sample yaml files, where I could find all steps and configurations on Traefik and Ingress side as well as on the applications side?
I hope there are any available. I couldn't find how to configure Traefik in the Traefik documentation