Skip to content
OnDevKit

Compose to Kubernetes

Convert a docker-compose.yml into Kubernetes Deployments, Services and volumes, or systemd units.

  • Never uploaded
  • Works offline
  • Free, no sign-up

docker-compose.yml

Kubernetes manifests

Paste a docker-compose.yml to get Kubernetes manifests or systemd units.

Processed on this device. Nothing is sent to a server.

How to use the Compose to Kubernetes

  1. Step 1Paste your Compose fileAny docker-compose.yml or compose.yaml.
  2. Step 2Pick the outputKubernetes manifests, or systemd units that run each container.
  3. Step 3Review the notesAnything without a direct equivalent is listed, never silently dropped.

How Compose maps to Kubernetes

Each Compose service becomes a Deployment. Services with ports or expose also get a Kubernetes Service with the same name, so containers keep finding each other by name, just as they do on a Compose network. Named volumes become PersistentVolumeClaims, tmpfs mounts become in-memory emptyDir volumes, health checks become liveness and readiness probes, and deploy.resources becomes requests and limits.

Some Compose features have no direct equivalent. Kubernetes doesn’t do startup ordering, so depends_on is replaced by readiness probes. Files on your machine (env_file, bind mounts, build contexts) need to become ConfigMaps, Secrets or pushed images. The converter flags each of these so you know what to finish by hand.

The systemd output is for running the same containers on a single Linux server without Compose: one unit per service, ordered by depends_on, all on a shared Docker network.

Questions

How is this different from kompose?

kompose is a command-line tool you install. This runs in your browser with nothing to install, explains what it couldn’t convert in plain language, and can also produce systemd units. Your Compose file, including any passwords in it, never leaves your device.

What happens to variables like ${DB_PASSWORD}?

Variables with a default, like ${DB_PASSWORD:-secret}, use the default. Variables without one are left as they are and listed at the top so you can fill them in. For real secrets, use a Kubernetes Secret.

Why do I see REPLACE_ME in the output?

Services that use build: instead of image: need an image in a registry before Kubernetes can run them, and relative paths need an absolute location on the server. Replace each REPLACE_ME with your value.

Which Service type should I choose?

ClusterIP (the default) makes a service reachable only inside the cluster, which is right for databases and internal APIs. Use LoadBalancer or an Ingress for services the outside world should reach, and NodePort for quick testing.

Related tools