Home Explore Blog CI



docker

1st chunk of `content/manuals/compose/bridge/usage.md`
ee124faac6c709051d8fb1f727c36c3a0f632f4447119bcc0000000100000901
---
title: Use the default Compose Bridge transformation
linkTitle: Usage
weight: 10
description: Learn about and use the Compose Bridge default transformation
keywords: compose, bridge, kubernetes
---

{{< summary-bar feature_name="Compose bridge" >}}

Compose Bridge supplies an out-of-the box transformation for your Compose configuration file. Based on an arbitrary `compose.yaml` file, Compose Bridge produces:

- A [Namespace](https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/) so all your resources are isolated and don't conflict with resources from other deployments.
- A [ConfigMap](https://kubernetes.io/docs/concepts/configuration/configmap/) with an entry for each and every [config](/reference/compose-file/configs.md) resource in your Compose application.
- [Deployments](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/) for application services. This ensures that the specified number of instances of your application are maintained in the Kubernetes cluster.
- [Services](https://kubernetes.io/docs/concepts/services-networking/service/) for ports exposed by your services, used for service-to-service communication.
- [Services](https://kubernetes.io/docs/concepts/services-networking/service/) for ports published by your services, with type `LoadBalancer` so that Docker Desktop will also expose the same port on the host.
- [Network policies](https://kubernetes.io/docs/concepts/services-networking/network-policies/) to replicate the networking topology defined in your `compose.yaml` file. 
- [PersistentVolumeClaims](https://kubernetes.io/docs/concepts/storage/persistent-volumes/) for your volumes, using `hostpath` storage class so that Docker Desktop manages volume creation.
- [Secrets](https://kubernetes.io/docs/concepts/configuration/secret/) with your secret encoded. This is designed for local use in a testing environment.

It also supplies a Kustomize overlay dedicated to Docker Desktop with:
 - `Loadbalancer` for services which need to expose ports on host.
 - A `PersistentVolumeClaim` to use the Docker Desktop storage provisioner `desktop-storage-provisioner` to handle volume provisioning more effectively.
 - A Kustomize file to link all the resources together.

## Use the default Compose Bridge transformation

Title: Compose Bridge Default Transformation: Usage and Features
Summary
Compose Bridge provides an automated transformation of your Compose configuration files into Kubernetes resources. It generates Namespaces, ConfigMaps, Deployments, Services (including LoadBalancers for Docker Desktop), Network Policies, PersistentVolumeClaims (using hostpath), and Secrets. Additionally, it includes a Kustomize overlay for Docker Desktop to manage LoadBalancers and PersistentVolumeClaims effectively, streamlining the deployment process.