Paste a docker-compose.yml and get Kubernetes manifests: a Deployment and Service per service, ConfigMaps for environment variables, a Secret for passwords, PersistentVolumeClaims for volumes and probes from healthchecks. Notes explain every setting that needs your attention.
Last updated:
Kubernetes manifests
Advertisement
Advertisement
How to use the Docker Compose to Kubernetes Converter
Paste your docker-compose.yml or open the file. A sample with a web server, API, database and cache loads first.
Choose the options: namespace, Service type, how environment variables and bind mounts are handled, and the PVC size.
Read the notes under the output. They flag things Compose does that Kubernetes does differently, such as depends_on or images built locally.
Filter by kind to check Deployments, Services or PVCs one by one, then copy or download the YAML or a ZIP.
Apply it with kubectl apply -f k8s.yaml and check the pods with kubectl get pods.
No. Kubernetes uses its own resource types, so a compose file has to be translated: each service becomes a Deployment that runs the pods and, if it has ports, a Service that gives it a stable name and address. This tool does that translation in your browser, similar to the kompose command-line tool.
How do services find each other after the conversion?
Each Service keeps the compose service name, and Kubernetes DNS resolves that name inside the namespace, so an app that connects to db:5432 keeps working. From another namespace use db.namespace.svc.cluster.local. Names with underscores or capitals are renamed because Kubernetes names must be lowercase DNS labels.
What happens to depends_on?
Kubernetes has no start order between Deployments; all pods start at once. Make each app retry its connections, rely on readiness probes so traffic only reaches pods that are ready, or add an init container that waits for the dependency.
How are volumes converted?
Named volumes become PersistentVolumeClaims mounted at the same path, and Deployments that use one get the Recreate strategy so the old pod releases the volume first. A bind-mounted single file, such as nginx.conf, becomes a ConfigMap mounted with subPath. Bind-mounted folders become a PVC, emptyDir or hostPath depending on the option you choose.
Why is my published port a ClusterIP Service?
A ClusterIP Service is reachable only inside the cluster, which is the safe default. To reach it from outside, pick NodePort or LoadBalancer in the options, add an Ingress for HTTP traffic, or use kubectl port-forward while testing.
What about images built with build:?
Kubernetes nodes pull images from a registry; they cannot build from a Dockerfile in your project. Build the image, push it to a registry the cluster can reach, and put that image name in the Deployment. The tool marks these services with a red note.
Is my compose file uploaded?
No. The YAML is parsed and converted with JavaScript in your browser tab, so passwords and internal hostnames in the file never leave your computer.
Are all the tools on FreeToolCabin tested for quality and accuracy?
Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.