kompose
Convert Docker Compose to Kubernetes resources
TLDR
Deploy a dockerized application to Kubernetes
Delete instantiated services/deployments from Kubernetes
Convert a docker-compose file into Kubernetes resources file
SYNOPSIS
kompose [global-options] subcommand [subcommand-options]
PARAMETERS
-f, --file filenames
Compose file(s) to use (default: docker-compose.{yml,yaml})
--dry-run
Print Kubernetes manifests to stdout without saving
--verbose level
Log verbosity level (0-5, default 2)
--version
Print version information
--help, -h
Show help
DESCRIPTION
Kompose is an open-source CLI tool designed to simplify the transition from Docker Compose to Kubernetes. It translates docker-compose.yaml files into native Kubernetes resources like Deployments, Services, Ingresses, Jobs, ConfigMaps, Secrets, and PersistentVolumeClaims.
Users familiar with Compose can quickly generate deployable manifests without deep Kubernetes knowledge. Kompose handles common features such as volumes, ports, environment variables, build instructions (via images), and labels. It supports multiple Compose files and validation.
Additional commands allow direct cluster interaction: deploy with up, teardown with down, edit resources, restart services, and more. Generated YAML is customizable via annotations. Kompose works on Linux, macOS, and Windows, requiring Docker and kubectl.
Ideal for development and CI/CD pipelines migrating container apps to Kubernetes.
CAVEATS
Does not support all Docker Compose features (e.g., extends, some network modes); check compatibility matrix. Requires valid Compose file; generated manifests may need manual tweaks for production.
KEY SUBCOMMANDS
convert: Generate Kubernetes YAML from Compose.
up: Convert and deploy to cluster.
down: Delete deployed resources.
edit: Edit specific resource type.
INSTALLATION
Download binary from GitHub releases, or use curl -L https://github.com/kubernetes/kompose/releases/download/v1.34.0/kompose-linux-amd64 and make executable.
HISTORY
Developed by Red Hat in 2016 as kompose; donated to Kubernetes SIG-apps in 2018. Actively maintained with regular releases aligning to Kubernetes versions.
SEE ALSO
docker-compose(1), kubectl(1), helm(3)


