Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert docker-compose files into Kubernetes YAML or .container quadlet files #9

Closed
Lunarequest opened this issue Apr 17, 2023 · 4 comments · Fixed by #16
Closed

Convert docker-compose files into Kubernetes YAML or .container quadlet files #9

Lunarequest opened this issue Apr 17, 2023 · 4 comments · Fixed by #16
Labels
enhancement New feature or request

Comments

@Lunarequest
Copy link

it would be very useful it podlet could convert compose files to quadlet files!

@k9withabone
Copy link
Member

I agree! However, maybe generating kubernetes pod yaml from a compose file would be a better fit? I guess it depends on if you want each container to be more separate with each having their own .container file or all together in a pod defined in a kubernetes yaml file with a .kube quadlet file for systemd integration.

@k9withabone k9withabone added the enhancement New feature or request label Apr 17, 2023
@Lunarequest
Copy link
Author

I agree! However, maybe generating kubernetes pod yaml from a compose file would be a better fit? I guess it depends on if you want each container to be more separate with each having their own .container file or all together in a pod defined in a kubernetes yaml file with a .kube quadlet file for systemd integration.

the main use case for docker-compose is that kubernetes is can be overly "heavy" so to speak for a simple container deployment eg just a webserver and a db. However I see the other side where someone may want to "translate" the compose to a k3s+podman deployment so maybe a flag to switch between the 2 modes?

@k9withabone
Copy link
Member

The other thing with podman pods is that all containers in a pod share a network and UID/GID namespace. From my understanding, the default network configuration for rootless podman is such that containers not in a pod can't communicate with each other unless they use the host's IP. So someone translating a docker-compose file into separate .container files won't necessarily have the same behavior that they are expecting. However, a .network file could also be created that all the containers join via the "Network=" option.
I think I'm going to try to get in touch with the podman-compose people to see what they might recommend and see where they had trouble converting docker things into podman.

@k9withabone k9withabone changed the title compose files Convert docker-compose files into Kubernetes YAML or .container quadlet files. Apr 17, 2023
@k9withabone k9withabone changed the title Convert docker-compose files into Kubernetes YAML or .container quadlet files. Convert docker-compose files into Kubernetes YAML or .container quadlet files Apr 17, 2023
@k9withabone
Copy link
Member

k9withabone commented Apr 17, 2023

Also, I've only been using docker/podman for about a year and only with my own small home lab. I haven't tried using k3s or anything very complicated, so please correct me if I say something wrong, or you have a different/better opinion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants