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

[Action] How can you rightsize your Kubernetes workloads to optimize for environmental sustainability? #392

Open
1 of 4 tasks
xamebax opened this issue Apr 19, 2024 · 6 comments

Comments

@xamebax
Copy link
Contributor

xamebax commented Apr 19, 2024

Description

There are multiple ways to scale your workloads inside Kubernetes.

There is a tension between scaling workloads horizontally and vertically. Being too conservative when scaling can lead to throttling and slow performance, with the risk of Pods being OOMKilled. Being too liberal, on the other hand, can lead to wasting resources by either running Pods that are too big, or running too many Pods.

What's the most environmentally efficient way to rightsize workloads running on Kubernetes? Can this be achieved with default Kubernetes behavior? Or is a custom autoscaler a necessary addition?

In another issue, contributors suggested looking into:

  • kube-green, which can scale workloads down to 0 when there's no activity,
  • rekuberate-io/sleepcycles, "which is similar to kube-green but it covers a broader range of Kubernetes resources: DeploymentsCronJobsStatefulSets and HorizontalPodAutoscalers."
  • In our brainstorming session, Max brought up Keda, which allows for event-driven autoscaling.

Note: this could turn out to be a substantial piece of work to do on one's own.

Outcome

A recommendation in our working document that helps the reader make a choice on how they can rightsize their workloads with environmental sustainability in mind. Would using kube-green, sleepcycles, or Keda offer benefits here? How would that look? It would be great to say a few words about expected effort if changes to the cluster are required, and how big that effort could be (small, medium, large). Additionally, if possible, it would be great to add optional, extra reading material with added context if the reader's interested and has time.

To-Do

  • research if this could be a worthy recommendation,
  • if yes, write a recommendation,
  • share it for review, implement feedback.

Code of Conduct

  • I agree to follow this project's Code of Conduct

Comments

@mkorbi, @JacobValdemar - I'd love your input on this task's wording and scoping. Do you think it's actionable enough, or too vague? Anything worth adding?

@xamebax xamebax self-assigned this Apr 19, 2024
@xamebax xamebax changed the title [Tracking] How can you rightsize your Kubernetes workloads to optimize for environmental sustainability? [Action] How can you rightsize your Kubernetes workloads to optimize for environmental sustainability? Apr 19, 2024
@graz-dev
Copy link

graz-dev commented May 8, 2024

Hi, as my mext contribution to the project I can start working on this issue by the end of this week and the star of the next one.
Is ok for you?

@JacobValdemar @xamebax

@JacobValdemar
Copy link

@graz-dev Fine with me, but let's hear what @xamebax thinks. After all, she is the assignee on this issue ☺️

@xamebax
Copy link
Contributor Author

xamebax commented May 13, 2024

@graz-dev this is great, go for it! I'm assigned as the creator, and I haven't done any work on this other than create the ticket. :D I'm sorry it took me so long to reply, I am hoping this wasn't demotivating. I can go ahead and assign you!

@graz-dev
Copy link

Yep @xamebax assign it to me!
I can work on it in the following days 😁

@xamebax
Copy link
Contributor Author

xamebax commented May 15, 2024

@graz-dev done!

@akyriako do I remember correctly you were interested in participating in this one?

@akyriako
Copy link

Hi @xamebax , yes you do remember correct 👍 Please let me know where/how I could assist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Backlog
Development

No branches or pull requests

4 participants