Giter Club home page Giter Club logo

gitops-energy-usage-notes's Introduction

Energy-efficient Kubernetes

This project aims to measure and compare the energy consumption of snowflake clusters versus that of Flux-based GitOps clusters.

Another aim is to create a reference architecture for measuring the energy consumption of cloud-native processes using cloud-native tools.

The focus here is on energy usage rather than, for example, marginal emissions estimates. That being said, energy metrics could be used to deduce carbon emissions.

This project could be used as the base model for conducting Life Cycle Assessment (LCAs) of any cloud-native software that runs on a Pod.


[Update] The latest version of this project can be found here: https://github.com/nikimanoledaki/sustainability-journey-with-gitops


Resources

Get Started with Local Development

OS

Linux

For Linux users, create a cluster directly with minikube.

MacOS

For MacOS user, the dependencies are:

  • Virtualbox - brew install --cask virtualbox
  • Vagrant - brew install --cask vagrant

Then, use this Vagrantfile, and spin up a microVM with Flintlock:

vagrant up
vagrant ssh

Note: The Vagrantfile allocates 8GB for the microVM. The microVM itself is very lightweight but the cluster that will be allocated 6GB. Ensure you have enough RAM.

Start a Kubernetes cluster with minikube

First, create a minikube cluster:

minikube start --container-runtime=containerd --memory=6g --bootstrapper=kubeadm --extra-config=kubelet.authentication-token-webhook=true --extra-config=kubelet.authorization-mode=Webhook --extra-config=scheduler.bind-address=0.0.0.0 --extra-config=controller-manager.bind-address=0.0.0.0
minikube addons disable metrics-server

You will need to install kube-prometheus and kepler on your cluster.

To do this in a GitOps way, bootstrap Flux on your cluster.

Then, copy the Flux manifests for kube-prometheus and kepler to your config repo. Flux will automatically reconcile these for you.

Get Started in a Cloud Environment

### Example: Use Equinix for the Baremetal Host Liquid Metal can be used to create microVMs on any baremetal machine.

Follow thse instructions for how to use Equinix as a host baremetal machine.

Use this Terraform manifest, which contains the necessary configuration to be used as a host for Kepler.

Set up a Kubernetes management cluster locally with CAPI. Then, set up more clusters hosted on microVMs with CAPMVM.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.