Use the Converter
Access the Docker Compose to Kubernetes converter tool
docker-compose.yaml files.
What It Does
The converter transforms Docker Compose services into Kubernetes resources:- Services → Kubernetes Deployments and Services
- Volumes → PersistentVolumeClaims or other volume types
- Networks → Kubernetes Services with ClusterIP
- Ports → Service ports and optional Ingress resources
- Environment variables → ConfigMaps and Secrets
- Health checks → Liveness and readiness probes
When to Use
Use the converter when:- Migrating from Docker Compose - You have a working Docker Compose setup and want to deploy to Kubernetes
- Quick prototyping - You want to quickly test a Docker Compose app on Kubernetes
- Learning Kubernetes - You want to see how Docker Compose concepts map to Kubernetes resources
- CI/CD integration - You need to convert Compose files as part of an automated pipeline
The converter provides a good starting point, but you may need to adjust the generated manifests for production use. Review the generated resources and customize them based on your specific requirements.
How to Use
Access the Converter
The converter is available at https://cnap.tech/kompose. You can paste your Docker Compose YAML directly into the interface.Conversion Options
The converter supports several options to customize the output:- Provider - Choose Kubernetes or OpenShift
- Controller type - Deployment, DaemonSet, or ReplicationController
- Replicas - Number of pod replicas to create
- Volume type - PersistentVolumeClaim, emptyDir, hostPath, or ConfigMap
- Namespace - Target Kubernetes namespace
- Network policies - Generate NetworkPolicy resources for service isolation
- Helm chart - Generate a complete Helm chart (enabled by default)
Output Formats
The converter generates:- Kubernetes Manifests - Individual YAML files for each resource (Deployments, Services, ConfigMaps, etc.)
- Helm Chart - A complete Helm chart with:
Chart.yaml- Chart metadatavalues.yaml- Configurable valuestemplates/- All Kubernetes manifests as Helm templates
Example
Convert a simple web application with Redis: Input (docker-compose.yaml):docker-compose.yaml
Limitations
The converter handles most common Docker Compose features, but some features are not supported or require manual adjustment:Next Steps
After converting:- Review generated manifests - Check that all resources are correctly configured
- Customize values - Adjust resource limits, environment variables, and configurations
- Test locally - Use
kubectl applyorhelm installto test the converted application - Deploy to CNAP - Use the generated Helm chart as a source when creating products in CNAP
Related Topics
- Application Sources → - Learn about different source types in CNAP
- Templates → - Understand how templates work
- Create a Product → - Deploy your converted application as a product