DevToolkit converts infrastructure code from one tool to another. It runs as two small services on Kubernetes.
Hosted version: devtoolkit.cloud.run
DevToolkit has two converters. Each one has a web page and an API endpoint:
- Docker Compose to Kubernetes
- CloudFormation, AWS SAM and AWS CDK to Terraform
The project also shows how to run a small service on Kubernetes. It uses plain manifests, health probes, resource limits, non-root containers, a NetworkPolicy and a full CI/CD pipeline. All of it is small enough to read in one sitting.
The web service serves the pages and converter-api does the conversions. Only web can call the API.
| Tool | Minimum version | Needed for |
|---|---|---|
| Python | 3.13 | Dev Mode |
| GNU Make | 3.81 | Dev Mode, Kubernetes Mode |
| curl | Any current release | Dev Mode: downloads the Tailwind CLI once to build the web UI stylesheet |
| Node.js | 22 | Dev Mode: make editor bundles the code editor of the web UI once |
| Docker | Any current release | Kubernetes Mode: builds the images and runs kind |
| kind | v0.33.0 (pinned in .tool-versions) |
Kubernetes Mode |
| kubectl | 1.36 (the cluster runs Kubernetes 1.37) | Kubernetes Mode |
| jq | 1.5 | The example below |
| Terraform | 1.5 | make validate-terraform, which checks the Terraform that the CloudFormation converter writes |
Dev Mode runs both services with Python and reloads them when you change the code.
make install # create .venv and install dependencies for every service
make test # run the tests of every service with coverage
make run # start the API on http://localhost:8000 (docs at /docs)
make run-web # in a second terminal: start the web UI on http://localhost:8080Kubernetes Mode builds both images and runs them on a local kind cluster with the same manifests as production.
make deploy-local # create the kind cluster if needed, build the images, deploy k8s/
make port-forward # forward localhost:8080 to the web UI (keep it running)
# then open http://localhost:8080 in your browser
make cluster-down # delete the cluster when you are donemake help # list every make target with a short descriptionPost a Docker Compose file to the API and you get back Kubernetes Deployments and Services. The response also lists notes on anything you need to decide yourself. The web UI does the same through a form. Start the API with make run, then run:
curl -s localhost:8000/convert/compose-to-k8s/yaml \
-H 'Content-Type: application/json' \
-d '{"compose_yaml": "services:\n web:\n image: nginx\n ports:\n - \"8080:80\""}' \
| jq -r .yamlapiVersion: apps/v1
kind: Deployment
metadata:
name: web
...
---
apiVersion: v1
kind: Service
...
ports:
- name: tcp-8080
port: 8080
targetPort: 80
protocol: TCPTo convert a CloudFormation template, post it to /convert/cfn-to-terraform:
curl -s localhost:8000/convert/cfn-to-terraform \
-H 'Content-Type: application/json' \
-d '{"template": "Resources:\n Logs:\n Type: AWS::S3::Bucket\n Properties:\n VersioningConfiguration:\n Status: Enabled"}' \
| jq -r '.files[] | select(.path == "main.tf") | .content'resource "aws_s3_bucket" "logs" {}
resource "aws_s3_bucket_versioning" "logs_versioning" {
bucket = aws_s3_bucket.logs.id
versioning_configuration {
status = "Enabled"
}
}| Topic | |
|---|---|
| API reference | Endpoints, requests, responses, errors and input limits |
| Conversion rules | How each Compose field maps to Kubernetes |
| CloudFormation to Terraform | How CloudFormation, SAM and CDK templates convert to Terraform |
| Architecture | The project layout, the two services and how they run on Kubernetes |
| CI/CD | Workflows, image publishing and security scanning |
| Deploying to your cluster | How to run DevToolkit on your own Kubernetes cluster |
| Configuration | Environment variables |
| Roadmap | Planned features in priority order, the timeline and what is out of scope |