Git Product home page Git Product logo

cgroupv2-probes-kubernetes's Introduction

build status

CGROUP V2 METRICS

  • npm module for reading cgroupv2 RAM and CPU metrics.
  • Reads from /sys/fs/cgroup/.
  • Useful for kubernetes probes : readiness, liveness or prestop, all available since v1.25

Installation

npm install @mercure/cgroupv2-metrics

Use case

  • You can use those metrics to have more control over kubernetes pods :

A pod has a heavy load incoming, and you do not want that pod to be reached by kubernetes internal load-balancer. Since kubernetes does not provide load-balancer over resources consumption, you can use a readiness probe, which check metrics every "x" seconds and trigger the probe if RAM and/or CPU are overloaded. This probe will eject the pod from load-balancer by setting the pod "unavailable". Once consumption will decrease to an acceptable level, probe trigger will stop and the pod will be available from load-balancer again.

  • Check examples folder to see how k8s probes can be implemented

Want to work on project ?

With devcontainers, you can easily start up a dev environment on docker with your favorite IDE without download any package required by the project on your OS. Feel free to open PR and submit issues.

Read more on devcontainers

cgroupv2-probes-kubernetes's People

Contributors

thibaut-mouton avatar

Watchers

 avatar

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.