Giter Site home page Giter Site logo

123blin / egressd Goto Github PK

View Code? Open in Web Editor NEW

This project forked from castai/egressd

0.0 0.0 0.0 3.55 MB

Kubernetes aware network traffic monitoring

License: Apache License 2.0

Shell 0.94% Ruby 0.29% C 62.54% Go 33.97% Makefile 0.46% Smarty 0.82% Dockerfile 0.12% Starlark 0.85%

egressd's Introduction

egressd

Kubernetes aware network traffic monitoring.

How it works

  • DaemonSet pod starts on each node.
  • Conntrack entries are fetched for pods running on each at configured interval (5 seconds by default).
    • If Cilium is used then conntrack records are fetched from eBPF maps located at host /sys/fs/bpf. These maps are created by Cilium.
    • If Linux Netfilter Conntrack module is used then Netlink is used to get these records.
  • Records are reduced by source IP, destination, IP and protocol.
  • Kubernetes context is added including source and destination pods, nodes, node zones, ips.
  • Exporter can export logs to http or prometheus.

Priviledges

Egressd runs as priviledged container for a few reasons:

  1. DNS tracer uses eBPF.
  2. Fetch conntrack entries:
    • Bidirectional mount propogation is used to enable netfilter conntrack accounting and mount cgroupv2.
    • If Cilium is used collector reads from ebpf maps which stores data in kernel.

Install

Install demo with preconfigured grafana and prometheus metrics.

curl -fsSL https://raw.githubusercontent.com/castai/egressd/master/demo.sh | bash

Expose grafana locally

 kubectl port-forward svc/egressd-grafana 8080:80 -n egressd

Example dashboard available at http://localhost:8080/d/egressd/egressd Metrics should be visible after few minutes.

Dashboard

(Optionally) Install demo onlineboutique eshop

If you want to test egressd on empty cluster.

helm upgrade --install onlineboutique oci://us-docker.pkg.dev/online-boutique-ci/charts/onlineboutique -n demo --create-namespace

Development

Start all components + test grafana,promtheus in tilt local k8s cluster.

tilt up

Release procedure (with automatic release notes)

Head to the GitHub new release page, create a new tag at the top, and click Generate Release Notes at the middle-right. image

Run e2e tests locally

KIND_CONTEXT=tilt IMAGE_TAG=local ./e2e/run.sh

egressd's People

Contributors

anjmao avatar anthonyvg9 avatar atanasovskib avatar ciprianfocsaneanu avatar dan-cast-ai avatar dariuspie avatar domust avatar ivaka avatar karolisl avatar matas-cast avatar romanmelnyk113 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.