Home > Back-end >  What is the minimal version of Traefik required for kubernetes API v 1.22?
What is the minimal version of Traefik required for kubernetes API v 1.22?

Time:01-25

We have inherited a kubernetes application on GCP with a Traefik ingress controller, running an old version of traefik (traefik:v1.7.18-alpine). Google cloud is forcing kubernetes upgrades to v1.22 soon and we're getting GCP warnings that traefik is using deprecated k8s APIs.

enter image description here

Without getting into the weeds, does anybody know what the minimal version of traefik is that would be compatible with kubernetes 1.22? According to this thread, it seems it's traefik 2.X at least - https://github.com/traefik/traefik/issues/8343.

Wondering also if it's possible to configure traefik 1.X to not use this API somehow? Have no idea where/why this deprecated API is in use.

CodePudding user response:

If I'm not mistaken, Traefik 2.0 or later is required for Kubernetes API v1.22; I couldn't find a reference to that in the docs on a quick search. However, here's the Traefik 2.0 release blog: https://traefik.io/blog/traefik-2-0-6531ec5196c2/

There's also a migration guide https://doc.traefik.io/traefik/migration/v1-to-v2/ and a migration tool, but you might need to evalute if this is helpful: https://github.com/traefik/traefik-migration-tool

CodePudding user response:

Kubernetes API v1.22 requires atleast Traefik v2.5 and above as some APIs are deprecated in the Kubernetes version 1.22, as most of them were former Beta (v1beta1) APIs. In v2.5, the Traefik CRDs have been updated to support the new API version apiextensions.k8s.io/v1 as the Beta API version of IngressClass is no longer served as of version 1.22.

The support of the networking.k8s.io/v1beta1 API Version will stop in Kubernetes v1.22.

You can refer to these documentation for more information about Deprecation Warnings , Traefik v2 minor migrations & Migration from v1 to v2

I hope this answered your queries. Have a good day :-)

  • Related