Documentation
  • Getting Started
  • Creating a Product
    • Products Overview
    • Making a Helm Chart
      • Converting from docker-compose
      • Interpolated Values
      • Image Pull Secrets
      • Cluster Ingress
      • SSL Certificates
    • Setting up the Registry
      • Google Container Registry
  • Deploying a Product
    • Deployments Overview
    • Deploying on AWS
    • Deploying on GCP
    • Deploying on Azure (beta)
  • Debugging
    • GCP Permissions Errors
    • Volume Classes
Powered by GitBook
On this page
  1. Creating a Product
  2. Making a Helm Chart

Converting from docker-compose

Instructions on how to go from a docker-compose template to a Helm chart.

PreviousMaking a Helm ChartNextInterpolated Values

Last updated 4 years ago

If you normally stand up your deployment or dev environment with docker-compose, you can convert your docker-compose.yaml file to a Helm chart using .

To install Kompose (assuming you are on macOS and have installed):

brew install kompose

If you need instructions for a different platform or do not have access to Homebrew, please contact Metamanagement directly.

Once Kompose is installed, you need to add some labels to your docker-compose.yaml, so Kompose knows how to create your Kubernetes services. Under any service that is meant to be exposed to your users (i.e. as a web service), add kompose.service.type: nodeport and kompose.service.expose: "true":

services: 
  web-service:
    <...>:
    labels:
      kompose.service.type: nodeport
      kompose.service.expose: "true"

For more details on the types of labels that you can add and for more advanced configuration, please take a look at the .

To then convert docker-compose.yaml into a Helm Chart, you run:

kompose convert -c

By default, this will create your Helm Chart in a folder called docker-compose/. In docker-compose/Chart.yaml, you should update the name field to match whatever you want the name of the chart to be. You can then rename the docker-compose/ folder as you see fit.

Pointing at the right containers

Depending on how your docker-compose.yaml is set up, your newly created Helm Chart may not be pointing to a container registry where your images are hosted. To double-check, take a look at all of the files in <chart-folder>/templates/ of the form *-deployment.yaml, and search for the image: label. If the images specified are the ones in your cloud container registry, then all is well. To push your containers to the Google Cloud Registry, please see the following .

Metamanagement recommends using Google Cloud Registry as GCR has a reasonable story for provisioning authentication credentials for use in all Kubernetes environments. If you must use a different container registry, please contact Metamanagement directly.

Kompose
Homebrew
Kompose User Guide
instructions