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

docker-compose to k8s #1796

Closed
ghost opened this issue Jan 5, 2024 · 2 comments
Closed

docker-compose to k8s #1796

ghost opened this issue Jan 5, 2024 · 2 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature.

Comments

@ghost
Copy link

ghost commented Jan 5, 2024

What would you like to be added?

Title: Feature Request: Tool for converting Kubernetes manifests, including Kustomize files, to docker-compose format

Body:

Hello Kompose Team,

I am reaching out to suggest a feature that I believe would be beneficial for the community. As someone who often works with Kubernetes, I find myself in situations where I need to convert Kubernetes manifests, including Kustomize files, back to a docker-compose.yml format. While Kompose does a great job of converting docker-compose files to Kubernetes manifests, I find there's a lack of tools to do the reverse.

Use case:
I am dealing with simple applications that are running as single replicas in Kubernetes. For development and testing purposes, or for sharing with teams that are more familiar with Docker Compose, it would be extremely useful to have a tool that can take a Kubernetes deployment (even one that has been customized with Kustomize) and generate a corresponding docker-compose.yml.

Feature description:
The desired tool would parse Kubernetes Deployment, Service, and other relevant resource definitions, and translate them into Docker Compose service components. It should handle the following:

  • Container images
  • Environment variables
  • Port mappings
  • Volume mounts
  • Resource limits (if possible)
  • Any other basic settings that are common between the two

I understand that not all Kubernetes features can be represented in Docker Compose, especially those related to clustering and scaling, but a tool for handling the basic translation for single-replica applications would be highly valuable.

Thank you for considering this feature request. I am looking forward to any discussion around this topic and willing to contribute to the conversation or testing if needed.

Best regards,
[kevin]

Why is this needed?

Additionally, I would like to highlight that many of our clients operate within Docker environments rather than Kubernetes. This necessitates a more convenient method for converting configurations, as manually adapting Kubernetes manifests to Docker Compose formats is not sustainable given the scale of operations.

Our company has numerous development teams working on different products, and a streamlined conversion tool would greatly facilitate the process when sharing configurations or setting up environments that mirror client setups.

This capability would not only enhance productivity but also bridge the gap between Kubernetes and Docker workflows, allowing our teams to better cater to client preferences and infrastructure requirements.

Thank you again for your time and consideration.

Best regards,
[kevin]

@ghost ghost added the kind/feature Categorizes issue or PR as related to a new feature. label Jan 5, 2024
@AhmedGrati
Copy link
Contributor

@FreemanKevin Thanks for taking the time to open the issue and thoroughly explain your idea. AFAIK, the goal of the project is to help beginners get familiar with Kubernetes, by offering the conversion from docker-compose to Kubernetes. I'm not very sure of the other way around as it can (somehow) be not the goal of the project. Thoughts on this maybe @cdrage?

@cdrage
Copy link
Member

cdrage commented Jan 18, 2024

Unfortunately this is outside of the scope of the project and to be honest would not be beneficial for the Kubernetes community.

It would be better if this was a separate tool.

The Kompose license is very permissible, so if you want to look through the code and reverse-engineer it to go the opposite way, you have our blessing to do so!

@cdrage cdrage closed this as completed Jan 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

2 participants