coollabsio / coolify

An open-source & self-hostable Heroku / Netlify / Vercel alternative.
https://coolify.io
Apache License 2.0
34.72k stars 1.9k forks source link

[Feature]: Full Kubernetes support with autoscale #2390

Open peaklabs-dev opened 5 months ago

peaklabs-dev commented 5 months ago

Description

In the interface while adding a service there is a new step second step after selecting the service: Deploy to docker or deploy to k8s? -> We can choose the one we want and if we choose docker we get the same flow as now: place like localhost or remote, network ... If we choose k8s, we deploy via Kubernetes -> Only UI the rest is done automatically. Inspiration for such a flow would be: https://docs.kubero.dev/comparison/ -> ans also let us enable auto scale so the application can automatically scale.

cc @DeVoresyah

Minimal Reproduction (if possible, example repository)

DeVoresyah commented 5 months ago

putting a bounty on this to make it high-priority

johnstonmatt commented 5 months ago

Here's a New Feature Discussion about Kubernetes and Helm: https://github.com/coollabsio/coolify/discussions/2455

peaklabs-dev commented 5 months ago

Here's a New Feature Discussion about Kubernetes and Helm: #2455

This feature request does not talk about running coolify in Kubernetes as this is most likely not needed, it talks about running the services of coolify for example node applications, WordPress, databases in Kubernetes .

algora-pbc[bot] commented 5 months ago

💎 $50 bounty • CloudGakkai

💎 $50 bounty • tom.ebeyer

Steps to solve:

  1. Start working: Comment /attempt #2390 with your implementation plan
  2. Submit work: Create a pull request including /claim #2390 in the PR body to claim the bounty
  3. Receive payment: 100% of the bounty is received 2-5 days post-reward. Make sure you are eligible for payouts

Thank you for contributing to coollabsio/coolify!

Add a bounty • Share on socials

varshith257 commented 4 months ago

@DeVoresyah @ayntk-ai Need some more clarity and description of exact requirements of k8s deployment

peaklabs-dev commented 4 months ago

@varshith257 The idea is that we can select k8s instead of just regular container deployments. So instead of just selecting nixpacks or docker compose, we would select docker compose over k8s or GitHub app over k8s. The application and/or database is then deployed on k8s. For example, a WordPress service can be deployed on k8s and then there is automatic resource scaling, multiple pods, upscaling, downscaling and all of this even across multiple servers. Inspiration could be taken from this: https://www.youtube.com/watch?v=kmqhddc6UlI Features Needed:

varshith257 commented 4 months ago

@ayntk-ai Thank you for outlining the requirements for the Kubernetes support feature. I appreciate the opportunity to contribute to this project. However, after reviewing the detailed scope and complexity of the tasks involved, the current bounty of $100 does not adequately reflect the amount of work and expertise required to complete this issue. (PS: I have a bit experience in deploying applications with K8s)

asr2003 commented 4 months ago

+1 Agree with @varshith257

johnstonmatt commented 4 months ago

There are 2 components to implementing Kubernetes in the context of Coolify:

  1. Permit Kubernetes as a deployment target for applications through Coolify (generally how this issue has been focused)
  2. Permit installing Coolify itself in Kubernetes

Though I understand 1 is the target people are thinking about primarily here, it is nowhere near as useful or complete if 2 is not also implemented.

I believe that installing any app to Kubernetes should be done using Helm, targeted using kubeconfig, and that Coolify could be extremely powerful if it embraces this approach.

I recognize that 2 is in no way trivial, and that I'm an outsider with limited context, but I have very high conviction the Coolify project would be more successful if it doubles down on K8s in this way.

At the very least we should not call this Issue "full kubernetes support" if it is only supporting item 1.

Additionally I'd recommend looking at https://kompose.io if there is interest in simply making a docker compose file work in Kubernetes, it will do the static code transformation by CLI.

If it would be helpful for me to provide further input on the work required for 1 or 2 I would be happy to. Kubernetes is the universal and ubiquitous "OS of the cloud" and I really want to see Coolify win by leveraging it. This also opens the door to infrastructure-as-code and GitOps down the line which would elevate the project too.

nyxb commented 1 month ago

vote for 1