
These resources define the Pods to create as well as their network routing rules.Ī PersistentVolumeClaim also exists for the MySQL container. Here’s the result of converting the docker-compose.yml shown above:Ī Kubernetes deployment and service has been created for each of the Compose services. They’ll be placed into your working directory. Individual files are created for each component of your docker-compose.yml. You’ll see a few lines of output as Kompose writes manifest files for each of the resources in your Compose stack. kompose convert -f docker-compose.yml -f docker-compose-dev.yml Multiple files are accepted via the -f flag. It uses the docker-compose.yml in your working directory when no path is given. The kompose convert command accepts the path to a Docker Compose file and emits equivalent Kubernetes resource manifests. Either create a new cluster with a public cloud provider or spin up your own using a project like MicroK8s. You also need a Kubernetes cluster to deploy to. Several package managers are supported, too. Download the latest release, set the executable permission bit, and move the binary into a directory that’s in your path. Pre-built binaries are available from its GitHub repository. Kompose is available for Windows, macOS, and most popular Linux distributions. This was removed due to growing technical complexity. Older Kompose versions had a built-in up command that could deploy straight to your cluster without an intermediary conversion step. You must apply the converted Kubernetes resource manifests to your cluster using a tool like Kubectl. It’s developed as part of the Kubernetes project.Ĭurrent Kompose versions are limited to YAML file conversions. Kompose is a tool that lets you take Docker Compose files and deploy them to Kubernetes clusters. It’s usually seen as more complex than a regular Docker workflow, but its capabilities facilitate scalable container deployments in production. Kubernetes is a container orchestrator that comes with its own toolchain and manifest files. It’s a relatively simple tool that originally focused on local Docker installations. Docker Compose lets you define stacks of containers that you can manage collectively.
