Docker Compose to Kubernetes Converter

Paste a compose file, set namespace, service type and volume size, and get Kubernetes manifests plus a list of the decisions a human still has to make.

Se ejecuta en tu navegador. Tus archivos nunca salen de tu dispositivo. Cómo comprobarlo

…

Cómo hacerlo

  1. 1
    Paste your compose file

    Paste docker-compose.yml or compose.yaml, or open it from your device.

  2. 2
    Add variables

    Paste or open your .env file if the compose file uses ${...} placeholders.

  3. 3
    Set cluster options

    Choose namespace, service type, ingress host, volume size and storage class.

  4. 4
    Work through the checklist

    Read every To do and Check item and fix the source or the output.

  5. 5
    Review the YAML

    Look through the manifests as one file or one resource at a time.

  6. 6
    Download and test

    Download the YAML or ZIP and run kubectl apply --dry-run=server before applying.

Sobre esta herramienta

Many projects grow up on Docker Compose and then move to Kubernetes, and the first step is always rewriting the same information in a different shape. A compose service with an image, ports, environment variables, a named volume, a health check and resource limits turns into a Deployment, a Service, a ConfigMap, maybe a Secret and a PersistentVolumeClaim, with labels and selectors that must match exactly. This converter does that translation in your browser. It reads compose files in the current Compose Specification format, including both the short and long syntax for ports and volumes, list or map environment blocks, and variable substitution such as ${DB_PASSWORD:-changeme}, filled from an optional .env box. Each service becomes a Deployment with the right replica count, image, command and arguments, working directory, environment, ports, CPU and memory requests and limits, user and capabilities. Published or exposed ports become a Service named after the compose service, so other pods still reach it by the same host name. Environment variables go into a ConfigMap, and anything that looks like a password, token or key goes into a Secret instead. Named volumes become PersistentVolumeClaims and Deployments using them switch to the Recreate strategy. Health checks become liveness and readiness probes. Everything that has no clean equivalent, such as bind mounts, depends_on, networks or build-only services, lands in a review checklist with a concrete next step.

What the checklist covers

To do items are things that will not work until you act: images that only exist as a build context, secrets that need real values, bind mounts of local files, compose secrets and configs, and services without resource limits or readiness checks. Check items are risky choices such as privileged containers, latest tags, named users instead of numeric IDs, and several replicas sharing one ReadWriteOnce volume. Notes explain behaviour that changes, such as start-up order and restart policies.

Choosing options

ClusterIP is the safe default for published ports; use an Ingress host to expose one web service over HTTP, or LoadBalancer on a cloud provider. Set the volume size and storage class your cluster offers. A registry prefix is used for services that have no image yet.

Limits

This is not Kompose and it does not talk to your cluster. It does not convert build instructions, extends, profiles, include files, multiple compose files merged together, GPU reservations or Docker Swarm-only settings such as placement constraints. StatefulSets, Helm charts and Kustomize overlays are not generated. Review the YAML and run kubectl apply --dry-run=server before using it in production.

Ejemplo práctico

The sample has a web service (image example/web:1.4, port 8080:3000, two replicas, 0.5 CPU and 512M limits, a wget health check) and a postgres:16 database with a named volume pgdata and a bind-mounted init.sql. The output is 9 resources: 2 ConfigMaps, 2 Secrets (SESSION_SECRET and POSTGRES_PASSWORD), a 1Gi PersistentVolumeClaim, 2 Services (web on port 8080 to targetPort 3000, db on 5432) and 2 Deployments, with limits cpu 500m and memory 512Mi. The checklist lists 10 items, including the init.sql bind mount and the missing database health check.

Datos rápidos

Preguntas frecuentes

How are environment variables handled?

Plain values go into a ConfigMap named after the service and are loaded with envFrom. Names containing password, secret, token, key, credential or auth go into a Secret with stringData instead. You can switch either behaviour off to keep values inline in the Deployment.

What happens to depends_on?

Kubernetes has no start order between Deployments. The converter drops depends_on and adds a note. Readiness probes stop traffic until a pod is ready, and an app that retries its database connection, or an init container that waits for it, replaces the compose ordering.

Why did my bind mount become an emptyDir?

A path on your laptop, such as ./init.sql, does not exist on cluster nodes. The converter adds an empty placeholder volume so the YAML is valid and tells you how to create a ConfigMap from that file and mount it in the same place.

How are CPU and memory converted?

deploy.resources.limits.cpus of 0.5 becomes 500m and memory 512M becomes 512Mi. Reservations become requests. When only limits are given, requests are set to the same values, which you can lower.

Does it support variables like ${TAG}?

Yes. ${VAR}, ${VAR:-default} and ${VAR-default} are resolved from the variables box or the .env file you open. Variables without a value or default are left empty and listed in the checklist.

Can I get one file per resource?

Yes. Choose One resource to view each manifest on its own, or download the ZIP, which has numbered files such as 01-configmap-web-config.yaml so that kubectl apply -f on the folder creates them in a sensible order.

Totalmente gratisSin coste, sin registro
Tus archivos son privadosTodo se ejecuta en tu navegador
Fácil en tu idiomaDisponible en muchos idiomas