How to use it
- 1Paste your docker-compose.yml.
- 2Set the namespace and how published ports should be exposed.
- 3Read the notes, then kubectl apply -f kubernetes.yaml on a test cluster.
How Compose concepts map to Kubernetes
Each service becomes a Deployment with one container. image, command, entrypoint, working_dir, environment and user carry across directly. deploy.replicas sets the replica count, and resource limits and reservations become limits and requests, with memory units converted (512M → 512Mi).
ports and expose become containerPorts plus a Service named after the Compose service, so other workloads keep reaching it at the same hostname — db:5432 still resolves. Published ports can be exposed as ClusterIP, NodePort or LoadBalancer.
Named volumes become PersistentVolumeClaims. Healthchecks become liveness probes, with intervals and timeouts converted to seconds.
What needs a decision
depends_on has no Kubernetes equivalent: pods start in any order, so services must retry their connections. Bind mounts of host paths are converted to hostPath volumes but flagged, because they only work on single-node clusters — config files belong in a ConfigMap.
Environment variables whose names look like credentials (PASSWORD, SECRET, TOKEN, KEY) are called out so you can move them into a Secret. Services that build from a Dockerfile need their image pushed to a registry first.
Questions
How is this different from Kompose?
Kompose is a command-line tool you install; this runs in a browser tab and explains its decisions. The output is intentionally plain — Deployment, Service, PVC — so it is easy to review and adapt into Helm or Kustomize.
Are anchors and extension fields supported?
Yes. YAML anchors, aliases, merge keys (<<) and x- extension blocks are resolved before conversion.
Guides that use this tool
· 5 min read
From Docker Compose to Kubernetes: what translates and what you must redesign
Moving Docker Compose to Kubernetes: Deployments and Services, depends_on, volumes, secrets, health checks, cron jobs — and the parts that need a redesign.