A conversion tool for Docker Compose to container orchestrators such as Kubernetes (or OpenShift).
Kompose is a conversion tool designed to streamline the process of translating Docker Compose files into Kubernetes manifests or OpenShift templates. This software simplifies the transition from Docker-based deployments to container orchestration platforms by automating the creation of compatible configurations.
Key Features:
Converts Docker Compose services, volumes, and networks into Kubernetes resources.
Supports multiple target orchestrators, including Kubernetes and OpenShift.
Handles complex service dependencies and configurations seamlessly.
Provides validation tools to ensure compatibility with target environments.
Audience & Benefit:
Ideal for developers and DevOps engineers managing containerized applications. Kompose enables efficient migration from Docker Compose setups to scalable, cloud-native deployments on Kubernetes or OpenShift, reducing manual effort and minimizing errors during the transition process. It can be installed via winget for easy setup in your development environment.
README
Kompose (Kubernetes + Compose)
kompose is a tool to help users who are familiar with docker-compose move to Kubernetes. kompose takes a Compose Specification file and translates it into Kubernetes resources.
kompose is a convenience tool to go from local Compose environment to managing your application with Kubernetes. Transformation of the Compose Specification format to Kubernetes resources manifest may not be exact, but it helps tremendously when first deploying an application on Kubernetes.
Use Case
Convert compose.yaml into Kubernetes deployments and services with one simple command:
$ kompose convert -f compose.yaml
INFO Kubernetes file "frontend-service.yaml" created
INFO Kubernetes file "redis-leader-service.yaml" created
INFO Kubernetes file "redis-replica-service.yaml" created
INFO Kubernetes file "frontend-deployment.yaml" created
INFO Kubernetes file "redis-leader-deployment.yaml" created
INFO Kubernetes file "redis-replica-deployment.yaml" created
Other examples are provided in the examplesdirectory.
Installation
We have multiple ways to install Kompose. Our preferred method is downloading the binary from the latest GitHub release.
Our entire list of installation methods are located in our installation.md document.
Download from GitHub and add the binary to your PATH.
Shell autocompletion
We support Bash, Zsh and Fish autocompletion.
# Bash (add to .bashrc for persistence)
source <(kompose completion bash)
# Zsh (add to .zshrc for persistence)
source <(kompose completion zsh)
# Fish autocompletion
kompose completion fish | source
Kubernetes Community: As part of the Kubernetes ecosystem, we follow the Kubernetes community principles. More information can be found on the community page.
Chat (Slack): We're fairly active on Slack and you can find us in the #kompose channel.