docs/content/migrate/v2-to-v3.md
How to Migrate from Traefik v2 to Traefik v3. {: .subtitle }
!!! success "Streamlined Migration Process" Traefik v3 introduces minimal breaking changes and maintains backward compatibility with v2 syntax in routing configuration, offering a gradual migration path.
With Traefik v3, we are introducing a streamlined transition process from v2. Minimal breaking changes have been made to specific options in the install configuration, and we are ensuring backward compatibility with v2 syntax in the routing configuration. This will offer a gradual path for adopting the v3 syntax, allowing users to progressively migrate their Kubernetes ingress resources, Docker labels, etc., to the new format.
The migration process consists of three progressive steps designed to minimize risk and ensure a smooth transition:
!!! abstract "Migration Steps"
Step 1: Prepare configurations and test v3
Step 2: Migrate production instances to Traefik v3
Step 3: Progressively migrate routing configuration
!!! info "Preparation Phase" This step focuses on updating install configurations and enabling backward compatibility for a safe testing environment.
Review and Update install Configuration
Check the changes in install configurations and operations brought by Traefik v3. Modify your configurations accordingly.
Enable v2 Compatibility Mode
Add the following configuration to maintain v2 syntax compatibility:
# install configuration
core:
defaultRuleSyntax: v2
!!! note "Backward Compatibility" This snippet in the install configuration makes the v2 format the default rule matchers syntax.
Start Your Test Environment
Validation Checklist
!!! success "Ready for Next Step" If you don't get any error logs while testing, you are good to go! Otherwise, follow the remaining migration options highlighted in the logs.
Once your Traefik test instances are starting and routing to your applications, proceed to the next step.
!!! warning "Production Migration" This is the critical step where you migrate your production environment. Proper monitoring and rollback preparation are essential.
Progressive Deployment
We strongly advise you to follow a progressive migration strategy (Kubernetes rolling update mechanism, for example) to migrate your production instances to v3.
Required Preparations
!!! danger "Critical Requirements" - ✅ Real-time monitoring solution for ingress traffic (monitoring guide) - ✅ Rollback plan ready for immediate execution - ✅ Team availability during migration window
During Migration:
Validation Steps:
!!! success "Migration Complete" Once every Traefik instance is updated, you will be on Traefik v3!
!!! info "Optional Immediate Step" This step can be done later in the process, as Traefik v3 is compatible with the v2 format for routing configuration. Enable Traefik logs to get some help if any deprecated option is in use.
Review Routing Configuration Changes
Check the changes in routing configuration to understand what updates are needed.
Progressive Router Migration
!!! tip "Migration Strategy" - Start with development or staging environments - Migrate one service at a time - Test each migration thoroughly before proceeding - Keep detailed logs of what was changed
Once all Ingress resources are migrated to v3 syntax, remove the compatibility configuration:
# Remove this from install configuration
core:
defaultRuleSyntax: v2 # ← Delete this entire section
!!! success "🎉 Migration Complete!" You are now fully migrated to Traefik v3 and can take advantage of all the new features and improvements!
Final Checklist:
{% include-markdown "includes/traefik-for-business-applications.md" %}