/devops:nginx-to-traefikfrom devops
Ports NGINX Ingress resources to Traefik Ingress while keeping both controllers running, using DNS cutover for zero-downtime migration. Designed for eye-of-horus-gitops conventions.
Ships in devops. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Invoked by Zeus pipeline *nginx-to-traefik.
This skill is the first half of the chained migration NGINX → Traefik
Ingress → Gateway API. Used standalone it ports a batch of services to
Traefik while leaving the NGINX controller serving everyone else. Used
under skill nginx-to-gateway (the orchestrator), its state.yaml output
is consumed as the input to skill gateway-api-migration with
--source-class traefik.
| File | When to read |
|---|---|
references/nginx-to-traefik-env-config.md | Step 0b — env-config schema and operator prompts |
references/annotation-translation.md | Step 3 — annotation mapping |
references/dns-cutover-runbook.md | Step 10 — printed/linked at end of run |
| Script | Used by | Purpose |
|---|---|---|
scripts/inventory_nginx_ingresses.py | Step 1 | Per-overlay nginx Ingress inventory |
scripts/generate_traefik_ingress.py | Step 3 | Emit <service>-traefik-ingress.yaml |
scripts/update_kustomization.py | Step 5, 6 | Idempotent edits to kustomization.yaml + app.ingress.yaml |
scripts/validate_cross_consistency.sh | Step 7b | 4-way DNS↔verify↔ingress↔cert cross-check |
Triggered explicitly by *nginx-to-traefik from Zeus. Not auto-triggered.
*nginx-to-traefik # interactive: inventory + propose batches
*nginx-to-traefik <env> # process all services in one env
*nginx-to-traefik <env> <batch> # named batch (b1 | b2)
*nginx-to-traefik <env> <service> # single service
*nginx-to-traefik --resume # continue from state.yaml
| Step | Action | Script |
|---|---|---|
| 0 | Tool check (kustomize, yq, git) | inline command -v |
| 0b | Load references/nginx-to-traefik-env-config.md; prompt operator for Traefik + nginx LB IPs if missing, write to config, then continue | inline |
| 1 | Inventory active nginx ingresses per env | inventory_nginx_ingresses.py |
| 2 | Propose batch plan, wait for y/N confirmation | inline |
| 3 | Generate <service>-traefik-ingress.yaml per service | generate_traefik_ingress.py |
| 4 | git mv nginx file to archive/ | inline |
| 5 | Edit kustomization.yaml: add Traefik file to resources:, drop nginx from patches: | update_kustomization.py |
| 6 | Update common.traefik/overlays/<env>/app.ingress.yaml managed-cert host list | update_kustomization.py |
| 7 | kustomize build both modules for the env | inline |
| 7b | 4-way consistency check | validate_cross_consistency.sh |
| 8 | Update scripts/dns-create-traefik.sh batch list | inline |
| 9 | Update scripts/verify-traefik-<env>.sh URL list | inline |
| 10 | Print commit message + file list (never auto-commit) | inline |
Run command -v kustomize yq git. HALT on any missing.
Read references/nginx-to-traefik-env-config.md. If state.yaml.envConfig
is missing entries for the target env, issue the 5 prompts listed in the
reference and write the captured values back. Never derive LB IPs from
any cluster resource — this is invariant §5.3 from the spec.
Invoke inventory_nginx_ingresses.py --overlay-dir <common.service/overlays/<env>>. Filter to ingressClass == "nginx".
Write to state.yaml.inventory[]. HALT if zero nginx ingresses found.
Group inventory entries by host TLD + service criticality. Default batches:
b1 = read-mostly services, b2 = write-heavy services. Print the proposed
batch plan and ask y/N. HALT on decline.
For each service in the active batch, invoke generate_traefik_ingress.py --input <service>-nginx-ingress.yaml --output <service>-traefik-ingress.yaml.
Capture stderr WARN lines into state.yaml.warnings[]. Compute SHA256 of
each output for state.yaml.outputs.traefikIngresses[].sha256.
git mv <service>-nginx-ingress.yaml archive/. HALT if the file is already
under archive/. Backup the pre-edit path in state.yaml.backups[].
update_kustomization.py --overlay-dir <overlay> \
--replace <service>-nginx-ingress.yaml=<service>-traefik-ingress.yaml \
--drop-patch <service>-nginx-ingress.yaml
The script is idempotent: re-running step 5 on a complete state is a no-op.
For each new Traefik Ingress, ensure its primary host is present in
common.traefik/overlays/<env>/app.ingress.yaml.spec.tls[].hosts and
spec.rules[].host. Use update_kustomization.py --app-ingress <path> --add-host <host>.
kustomize build common.service/overlays/<env> > /tmp/svc-build.yaml
kustomize build common.traefik/overlays/<env> > /tmp/traefik-build.yaml
HALT on non-zero exit. Roll back step 4–6 via git restore of backed-up
files.
Invoke validate_cross_consistency.sh with the four host sources. HALT
on non-zero exit. The stderr stale-host list goes into the report.
Locate scripts/dns-create-traefik.sh. Find or create the array
HOSTS_<ENV_UPPER>_<BATCH_UPPER>=(...). Insert each new host (idempotent
via grep -q before append). Record the diff in state.yaml.steps["8"].
Same pattern as Step 8 but URLS_<ENV>_<BATCH> in
scripts/verify-traefik-<env>.sh. URL format: https://<host>/.
Never auto-commit. Print:
references/dns-cutover-runbook.md for the operator to follow after the commit lands.state.yaml)The state file lives at docs/reports/nginx-to-traefik/<slug>/state.yaml
where <slug> is <env>-<batch>-<isodate>. Schema:
schemaVersion: 1
skillVersion: "1.0.0"
env: dev
batch: b1
createdAt: 2026-05-14T10:00:00Z
envConfig:
capturedAt: <iso>
envs:
dev: { nginxLbIp: ..., traefikLbIp: ..., certIssuer: ..., managedCertNamespace: ..., managedCertResourceName: ... }
inventory:
- { file: argocd-nginx-ingress.yaml, name: argocd-server, namespace: argocd, hosts: [argocd.dev.example.com] }
batchPlan:
b1: [argocd-server, grafana]
outputs:
traefikIngresses:
- { file: argocd-traefik-ingress.yaml, host: argocd.dev.example.com, namespace: argocd, backend: argocd-server, port: 80, sha256: <hex> }
backups:
- { path: argocd-nginx-ingress.yaml, restorePath: archive/argocd-nginx-ingress.yaml }
steps:
"0": { status: pass }
"0b": { status: pass, prompts: 0 }
"1": { status: pass, count: 2 }
"2": { status: pass, confirmed: true }
"3": { status: pass, generated: 2, warnings: 0 }
"4": { status: pass, moved: 2 }
"5": { status: pass, edits: 2 }
"6": { status: pass, hostsAdded: 2 }
"7": { status: pass }
"7b": { status: pass, staleHosts: [] }
"8": { status: pass, hostsAdded: 2 }
"9": { status: pass, urlsAdded: 2 }
"10": { status: pass }
warnings: []
verdict: COMPLETE
The outputs.traefikIngresses[] list is the hand-off contract for skill C
(nginx-to-gateway): when chained, skill C reads this list and passes
--source-class traefik --source-state <statePath> to skill B.
| Step | Halt cause |
|---|---|
| 0 | Required tool missing |
| 0b | Operator declines to supply env-config values |
| 1 | Zero nginx Ingresses found |
| 2 | Operator declines batch plan |
| 3 | generate_traefik_ingress.py exit code != 0 |
| 4 | File already under archive/ |
| 5 | kustomization.yaml schema mismatch |
| 7 | kustomize build non-zero |
| 7b | Cross-consistency check non-zero |
After halt, the skill writes state.yaml.verdict: HALTED with the failing
step. --resume re-runs from the failed step.
references/annotation-translation.md (opens in a new tab)references/dns-cutover-runbook.md (opens in a new tab)references/nginx-to-traefik-env-config.md (opens in a new tab)scripts/generate_traefik_ingress.py (opens in a new tab)scripts/inventory_nginx_ingresses.py (opens in a new tab)scripts/update_kustomization.py (opens in a new tab)scripts/validate_cross_consistency.sh (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub qwedsazxc78/devops-ai-skill --plugin devops12 skills in this plugin
/gateway-api-migrationMigrates Kustomize modules using NGINX Ingress to Gateway API resources. Dual-target: default Traefik (GatewayClass=traefik), opt-in GKE Gateway (--gateway-class gke-l7-global-external-managed). Handles master/minion topology (common.ingress/ + common.service/) as the primary case, with standalone Ingress as a fallback. Performs cluster-side preflight (CRDs, GatewayClass, policy CRDs, Traefik version probe on Traefik targets), deterministic discovery/analysis via bundled scripts, two-phase conversion with atomic rollback from full file backups, semantic diff of path and listener coverage, plus an ingress2gateway second-opinion cross-check. Renders a comprehensive report covering per-hostname mapping, TLS map, annotation inventory (translated/stubbed/unknown), risk register, cutover checklist, verification commands, and rollback procedures. Never modifies the master source; performs idempotent in-place edits only to common.service/overlays/<env>/kustomization.yaml.
/helm-version-upgradeManages Helm chart version upgrades across Terraform+Helm platforms. Handles atomic 3-file updates with version discovery from ArtifactHub. Use when upgrading Helm charts, checking for outdated versions, or performing version consistency checks.
/ingress-controller-installGitOps-flavored Traefik Ingress Controller bootstrap, env addition, or chart upgrade in a Kustomize + ArgoCD repo. Operates exclusively on files under `common.traefik/` (base, overlays, argocd manifests). Never runs `helm install` or `helm upgrade` — those are ArgoCD's job. Plan-only: edits Kustomize files, emits the `git add` / commit / push commands, and the operator drives git. Validates coexistence with `ingress-nginx` via Kustomize-build inspection (no live cluster required). Use for new-cluster bootstrap, adding a new env overlay, or bumping the Traefik chart version.
/ingress-migration-advisorRead-only planner that inventories every Ingress in a Kustomize repo, scores each service on five migration-readiness dimensions, and recommends one of four paths per service (direct-gateway, two-step, swap-only, defer). Output is a Mermaid Gantt plan plus ready-to-paste Zeus commands. Critical traffic-tier services are vetoed to defer. Services already on Traefik Ingress (sourceClass=traefik) auto-route to direct-gateway. Never mutates the repo; produces docs/reports/ ingress-migration-advisor/<slug>/plan.md and state.yaml. Use for end-of-life planning (ingress-nginx EOL 2025), migration sequencing, or per-service path advisory. Requires docs/ingress-tier-map.yaml in the consumer repo.
/kustomize-resource-validationAuto-trigger skill that activates when any kustomization.yaml file is edited. Validates resource references, patch references, orphaned files, cross-environment consistency, build success, and generator configurations.
/retire-nginxRetire the nginx ingress controller and all nginx Ingress resources from a Kustomize + ArgoCD repo after Gateway API / Traefik migration is complete. Supports single-env (dev/stg/prd) or all-envs retirement in one command. Use this skill whenever: removing nginx after migration, cleaning up dead nginx Ingress resources from a kustomize base, decommissioning the ingress-nginx controller ArgoCD Application for an env, or retiring nginx from one environment without touching others. Safety-gated: aborts if no HTTPRoutes/Traefik Ingresses found (migration not done). Uses $patch: delete in the service overlay kustomization to exclude base nginx Ingress resources per-env — base files stay intact for other envs still using them.
Other plugins' skills for the same job