gitmyhub

kompose

Go ★ 11k updated 5d ago

Convert Compose to Kubernetes

A command-line tool that converts a Docker Compose file into Kubernetes configuration files automatically, saving you from manually translating your local multi-container setup into production cluster format.

GoKubernetesDocker Composesetup: easycomplexity 2/5

Kompose is a command-line tool that converts Docker Compose files into configuration files for Kubernetes. Docker Compose is a popular way to define and run multi-container applications on a local machine using a single text file that lists all the services, their settings, and how they connect. Kubernetes is a system for running those same containerized applications on a cluster of servers, but it uses a different and more complex set of configuration files. Kompose bridges the gap by reading your existing Compose file and generating the Kubernetes equivalents automatically.

The conversion is not perfectly one-to-one in every case, because Docker Compose and Kubernetes have different concepts and not everything maps directly. However, for most common application setups, running one command with your Compose file produces a set of ready-to-use Kubernetes deployment and service files that you can apply immediately. This saves a significant amount of manual translation work when moving a project from local development to a production cluster.

Installing Kompose is straightforward: you download a single binary file from the project's GitHub releases page and put it on your system path. There are also packages available through Homebrew on macOS, several Linux package managers, and Windows. The tool supports shell autocompletion for Bash, Zsh, and Fish.

Kompose is an official Kubernetes project, maintained under the Kubernetes GitHub organization and following the broader Kubernetes community guidelines. Documentation is available on the project's website and covers installation, a user guide, and details about how specific Compose features are translated.

Where it fits