Tools / docker-compose to Kubernetes

docker-compose to Kubernetes.

Convert a docker-compose.yml into Kubernetes Deployments, Services and PersistentVolumeClaims.

Runs in your browser

Ctrl/⌘ + Enter to run · Ctrl/⌘ + Shift + C to copy the result

Result
Kubernetes manifests
Notes
Stats

About docker-compose to Kubernetes

docker-compose to Kubernetes reads a compose file and writes the Kubernetes manifests you would otherwise type by hand, in the spirit of kompose. Each service becomes an apps/v1 Deployment with an app label, its replica count from deploy.replicas, the image, the entrypoint as command and the compose command as args (string commands are split like a shell would), environment variables, working directory, container ports, a securityContext for privileged, read-only, numeric user and capabilities, and resource requests and limits. Units are translated carefully: compose memory such as 512M means mebibytes and becomes 512Mi, because "512m" in Kubernetes would mean 0.512 bytes, and cpus: "0.5" becomes 500m. A healthcheck becomes a liveness probe with exec command, period, timeout, failure threshold and initial delay parsed from durations like 1m30s. Published and exposed ports produce a Service with named ports, using the type you choose. Named volumes become PersistentVolumeClaims of the size you set, anonymous volumes and tmpfs become emptyDir, and bind mounts become hostPath with a warning. Variables like ${TAG:-1.4} take their default; variables without one are left as-is and listed. The YAML reader handles anchors, merge keys, flow collections and block strings. Fields with no Kubernetes equivalent, such as depends_on or container_name, are listed in the notes. Review the result before applying it: secrets belong in Secret objects, not plain env values. Everything runs in your browser.

How to Use

  1. Paste your docker-compose.yml (YAML or JSON).
  2. Set the namespace, Service type and PVC size.
  3. Review the notes, then save the manifests and apply them with kubectl apply -f.

Frequently Asked Questions

How is this different from kompose?

It follows the same idea but runs in the browser with no install. It covers the common fields; kompose-specific labels, build steps and Helm output are not supported.

Why does memory 512m become 512Mi?

Compose byte values use binary units, while in Kubernetes a lowercase m means "milli". Writing 512m in a Kubernetes manifest would request half a byte, so the unit is converted.

What happens to depends_on?

Kubernetes starts pods independently, so ordering is not expressible. Use readiness probes or init containers; the field is listed in the notes.

Is my compose file uploaded?

No. It is parsed and converted in your browser.

Related Tools