Context
An ed-tech company serves its learner and admin apps on the schools' own domains, about 993 of them. I led the move of the legacy routing onto the company's new Kubernetes edge.
The problem
The old routing ran on one unmanaged Ubuntu 16.04 virtual machine on AWS. Its configuration existed only on its own disk, so nobody could review it, version it or rebuild it.
What I did
I read the routes off the old machine and ported them to an nginx gateway on GKE as one regex location plus map tables, since includes were not available in that setup.
I covered 12 legacy admin sub-apps and several other route families, and checked rule precedence by simulating 20 paths.
I chose not to port routes that would expose internal tools.
I added a guard variable that blocks the admin app on customer domains.
I also built header-based preview routing, so a branch of an app can be served on a real school domain without touching dev.
Key decision
I ported routes selectively instead of copying everything. A faithful copy would have been faster and would also have carried over exposure that nobody had decided to keep.
The cost was more review time and a longer list of questions for the people who owned each route.
Result
The legacy machine was decommissioned in August 2026. A guard keeps the admin app off about 993 customer domains.
What I learned
Next time I would add an nginx config test to the pipeline. Without one, a bad config is found in deployment, not in review.
Stack
- GKE
- Gateway API
- nginx
- Terraform
- Cloud Build
- GCS
