karmada-io / karmada

Open, Multi-Cloud, Multi-Cluster Kubernetes Orchestration
https://karmada.io
Apache License 2.0
4.39k stars 867 forks source link

Support carbon awareness when selecting which clusters to propagate resources #3917

Open rossf7 opened 1 year ago

rossf7 commented 1 year ago

What would you like to be added:

I'd like to be able to use Karmada to move workloads to clusters at physical locations with lower carbon emissions.

Why is this needed:

Data centres consume 1-1.5% of global electricity usage according to the IEA. Energy usage from data centres is increasing rapidly. https://www.iea.org/energy-system/buildings/data-centres-and-data-transmission-networks

Carbon aware spatial shifting can reduce carbon emissions by moving workloads to regions with lower carbon intensity.

This paper presented at the HotCarbon 23 conference found a similar approach implemented using a global load balancer service could provide savings on average of 21%. https://hotcarbon.org/2023/pdf/a6-maji.pdf

Since Karmada already has powerful multi-cluster and multi-cloud scheduling capabilities it would be great to extend this to add carbon awareness.

rossf7 commented 1 year ago

I've developed a prototype operator which I demoed today at the Karmada community meeting. Thanks for having me!

It would be great to collaborate with the community to implement this as a production ready feature.

Code: https://github.com/rossf7/carbon-aware-karmada-operator Blog: https://rossfairbanks.com/2023/07/12/carbon-aware-spatial-shifting-with-karmada/ Slides: CarbonAwareKarmadaOperator.pdf