Skip to content
migration.tools
Docker Compose to Kubernetes

Docker Compose to Kubernetes converter

Moving from a single Docker host to a cluster? Paste your Compose file and get Kubernetes manifests you can apply: a Deployment per service, Services for the ports, PersistentVolumeClaims for named volumes — and a plain-language list of the Compose features that don't translate.

Options

Docker Compose

Kubernetes

The result appears here as soon as there is input.

Processed on this device. Nothing you paste or drop is uploaded.

How to use it

  1. 1Paste your docker-compose.yml.
  2. 2Set the namespace and how published ports should be exposed.
  3. 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