Examples and Quick Reference
Quick reference for natural language prompts, workflow triggers, and command patterns. For detailed step-by-step guides, see Common Workflows.
Example Requestsβ
Traffic Routingβ
"Create a weighted canary route 'api-service-route' in 'production' for 'api.example.com' β 100% stable, 0% canary."
"Shift traffic to 90% stable, 10% canary for 'api-service-route' in 'production'."
"Create route 'frontend-route' with path prefix '/api' and TLS enabled."
"Delete the 'api-service-route' in 'production' β deployment is complete."
Header & Cookie Routingβ
"Create a route matching header 'X-Canary: true' β send all matching traffic to canary."
"Set up cookie-based routing with cookie_name=canary and cookie_regex=.*yes.*."
Middlewareβ
"Add a rate limiter 'api-limit' β 100 req/s average, 200 burst."
"Create a circuit breaker 'api-cb' that trips at 30% error rate with response_code=429."
"Strip the '/api' prefix from incoming requests using middleware 'api-strip'."
"Attach 'rate-limit' middleware to 'api-service-route' in 'production'."
Traffic Mirroringβ
"Mirror 20% of production traffic to the canary β zero user impact."
"Ramp mirroring to 50% β shadow is healthy."
"Disable mirroring β shadow testing complete."
TCP Routingβ
"Create a TCP route 'postgres-route' for service 'postgres' on port 5432."
"Create a TCP IP allowlist 'db-allowlist' allowing 192.168.1.0/24 and 10.0.0.1."
NGINX Migrationβ
"Generate the NGINXβTraefik migration bundle for 'production' without applying it."
"Apply the migration but ignore 'auth-url' annotation and inject 'custom-auth' middleware."
"Revert the migration for Ingress 'api' in 'staging'."
Backend Configurationβ
"Create a ServersTransport with dial timeout 5s and response timeout 60s."
"Enable sticky cookies on Service 'api-svc' with cookie name SESSIONID."
Monitoringβ
"What's the current traffic split for 'api-service-route' in 'production'?"
"Show me all Traefik routes across the cluster."
"Are there any traffic anomalies detected?"
"Show performance metrics for 'api-service' in 'production'."
Command Reference Guideβ
| User Intent | Core Tools | Example Query |
|---|---|---|
| Create canary route | traefik_manage_weighted_routing (create) | "Create a 90/10 route for api.example.com" |
| Shift traffic weights | traefik_manage_weighted_routing (update) | "Shift to 50/50 split" |
| Add middleware | traefik_manage_middleware (create) | "Add rate limit of 100 rps" |
| Shadow test | traefik_manage_traffic_mirroring (enable) | "Mirror 20% of traffic to canary" |
| TCP routing | traefik_manage_tcp_routing (create) | "Route Postgres on port 5432" |
| NGINX migration | traefik_nginx_migration (generate/apply) | "Migrate NGINX Ingresses to Traefik" |
| Simple route | traefik_manage_simple_route (create) | "Route api.example.com to api-service" |
| Sticky sessions | traefik_configure_service_affinity (enable) | "Enable sticky cookies on api-svc" |
| Backend TLS | traefik_manage_servers_transport (create) | "Add backend timeout of 60s" |
| Generate YAML | traefik_generate_routing_manifest | "Generate TraefikService YAML for review" |
Tips and Best Practicesβ
Use Resources Before Toolsβ
Check the current state before making changes:
"Show me the current traffic distribution for 'api-service-route' in 'production'."
Use Generate Before Apply for Migrationsβ
Review the migration bundle before applying to production:
"Generate the NGINX migration bundle for 'production' first β don't apply yet."
Shadow Test Before Canaryβ
Mirror traffic to validate performance before shifting real users:
"Mirror 20% of production traffic to canary first, then we'll shift 5% of real traffic."
Use Migration Plan for Complex NGINX Setupsβ
If NGINX annotations are complex or breaking, use per-Ingress overrides:
"Apply migration but use a migration_plan to ignore 'auth-url' and inject our custom forward_auth middleware."
Next Stepsβ
- Common Workflows β Step-by-step workflow guides
- Tools β Available MCP tools reference
- Resources β MCP resources for monitoring
- Configuration β Server configuration