Skip to main content

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."
"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 IntentCore ToolsExample Query
Create canary routetraefik_manage_weighted_routing (create)"Create a 90/10 route for api.example.com"
Shift traffic weightstraefik_manage_weighted_routing (update)"Shift to 50/50 split"
Add middlewaretraefik_manage_middleware (create)"Add rate limit of 100 rps"
Shadow testtraefik_manage_traffic_mirroring (enable)"Mirror 20% of traffic to canary"
TCP routingtraefik_manage_tcp_routing (create)"Route Postgres on port 5432"
NGINX migrationtraefik_nginx_migration (generate/apply)"Migrate NGINX Ingresses to Traefik"
Simple routetraefik_manage_simple_route (create)"Route api.example.com to api-service"
Sticky sessionstraefik_configure_service_affinity (enable)"Enable sticky cookies on api-svc"
Backend TLStraefik_manage_servers_transport (create)"Add backend timeout of 60s"
Generate YAMLtraefik_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