← All work
Tooling · 2024–25

Railway-to-Kubernetes Template Converter

Overview

An automation pipeline that downloads the Railway template catalog and converts each template into deployable Kubernetes manifests, orchestrated with Trigger.dev. It lets the studio reuse Railway’s large library of one-click app templates on its own Kubernetes clusters.

Why It Exists

Railway has hundreds of community deployment templates, but they only run on Railway. To deploy those same services on self-managed Kubernetes, the team needed to programmatically translate each template’s services, env vars, and config into standard k8s manifests at scale.

What We Built

Node.js scripts forming the pipeline: downloadRailway.js pulls the template catalog (stored as hundreds of per-template JSON files under templates/ plus templates.json), templateKube.js transforms a template into Kubernetes manifests (using js-yaml and crypto for generated names/secrets), and index.js/sumActiveProject.js drive aggregation. Output manifests land in k8s-manifests/, with supporting kubeconfigs and a necessary-for-namespace.yaml. A functions/ Trigger.dev project (its own trigger.config.ts and trigger/ tasks) schedules and runs the conversion jobs.

Technologies & Approach

JavaScript/TypeScript for the conversion logic, js-yaml for manifest serialization, and Trigger.dev for durable orchestration of the download-and-convert workflow. The design treats Railway templates as a data source and emits provider-neutral Kubernetes YAML.

Outcome / Impact

Enabled bulk reuse of Railway’s template ecosystem on the studio’s own Kubernetes infrastructure, turning a catalog of platform-locked templates into portable manifests. Demonstrates pipeline-style DevOps automation and cross-platform deployment engineering.

Capabilities Demonstrated

  • Converting one platform’s deployment templates to another (Railway -> Kubernetes)
  • Bulk, programmatic Kubernetes manifest generation
  • Trigger.dev-orchestrated automation pipelines
  • Working with large machine-readable template catalogs
More work See all →