Search code examples
dockerkubernetesgoogle-kubernetes-enginetraefik

What are the steps to upgrade Traefik from v1 to v2 on GKE Kubernetes with ACME SSL terminator?


How to upgrade Traefik from v1 to v2 on GKE Kubernetes?

Currently, I'm using Traefik v1 as a reverse proxy with ACME SSL terminator on my GKE Kubernetes cluster. I recently upgraded my Kubernetes cluster to version 1.23 and found that Traefik v1 no longer works properly with this new version.

I want to switch to Traefik v2 to address this issue. However, I'm unsure about the specific steps I need to follow to upgrade from Traefik v1 to Traefik v2 on my GKE Kubernetes cluster.

Could you please provide a detailed guide on how to correctly perform this upgrade process? Are there any special considerations or precautions I need to keep in mind?

Thanks in advance for your help!


Solution

  • You dont have much to take care on GKE side however on traefik you have to update the YAML files as many breaking changes there.

    In v1 it is used to create the frontend, backend and normal ingress resource however with v2 there are few CRD resources like IngressRoute, Middleware.

    If you are fully changing from ingress to a gateway type solution you have to take care SSL/TLS part also as it's supported in different ways.

    Hopefully, you will be able to use the existing secret which stores you cert.

    apiVersion: traefik.containo.us/v1alpha1
    kind: IngressRoute
    metadata:
      name: testtls
    spec:
      entryPoints:
        - websecure 
      tls:
        secretname: ssl-cert
    

    i would recommend checkout once the official doc : https://doc.traefik.io/traefik/migration/v1-to-v2/