{"id":15282530,"url":"https://github.com/nirmata/kube-netc","last_synced_at":"2025-10-06T23:30:42.100Z","repository":{"id":54828382,"uuid":"250368828","full_name":"nirmata/kube-netc","owner":"nirmata","description":"A Kubernetes eBPF network monitor","archived":true,"fork":false,"pushed_at":"2021-01-26T23:18:08.000Z","size":575,"stargazers_count":80,"open_issues_count":6,"forks_count":16,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-10-01T14:26:43.433Z","etag":null,"topics":["ebpf","kubernetes","networking","prometheus"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nirmata.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-03-26T20:50:33.000Z","updated_at":"2024-06-07T15:42:19.000Z","dependencies_parsed_at":"2022-08-14T04:01:10.634Z","dependency_job_id":null,"html_url":"https://github.com/nirmata/kube-netc","commit_stats":null,"previous_names":["nirmata/kube-netsee"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nirmata%2Fkube-netc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nirmata%2Fkube-netc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nirmata%2Fkube-netc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nirmata%2Fkube-netc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nirmata","download_url":"https://codeload.github.com/nirmata/kube-netc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235563683,"owners_count":19010228,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ebpf","kubernetes","networking","prometheus"],"created_at":"2024-09-30T14:26:43.550Z","updated_at":"2025-10-06T23:30:36.798Z","avatar_url":"https://github.com/nirmata.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# kube-netc: A Kubernetes eBPF network monitor\n\n[![Build Status](https://travis-ci.org/nirmata/kube-netc.svg?branch=master)](https://travis-ci.org/nirmata/kube-netc) [![Go Report Card](https://goreportcard.com/badge/github.com/nirmata/kube-netc)](https://goreportcard.com/report/github.com/nirmata/kube-netc)\n\n\nkube-netc (pronounced \u003ci\u003ekube-net-see\u003c/i\u003e) is a Kubernetes network monitor built using eBPF\n\n## Getting Started\n\nTo test the current capabilities of **kube-netc**, this guide will walk you through viewing the network statistics of your nodes.\n\n### Install kube-netc\n\nFirst, install the daemon set using the install.yaml:\n\n``` \nkubectl apply -f https://github.com/nirmata/kube-netc/raw/master/config/install.yaml\n```\n\n### View results\n\nThis will start the **kube-netc** DaemonSet on your cluster and setup the required roles. Then, we get the name of the kube-netc pod:\n\n```\nkubectl get pods --all-namespaces | grep kube-netc\n```\n\nFor example, my **kube-netc** pod is:\n\n```\nkube-netc-j56cx\n```\nIn a new terminal, we port-forward the port of our pod so we can access it with *curl* outside the cluster with:\n\n```\nkubectl port-forward kube-netc-j56cx 9655:9655\n```\n\n9655 is the port we are going to access the Prometheus endpoint on. We can then curl the /metrics endpoint using curl on local host to show the Prometheus metrics:\n\n```\ncurl localhost:9655/metrics | grep bytes_recv{\n```\n\nThis is an example output of the query showing the total bytes received by this node from each given connection:\n\n```\n...\nbytes_recv{component=\"kube-controller-manager\",destination_address=\"172.18.0.2:1640\",destination_kind=\"pod\",destination_name=\"kube-controller-manager-drewcluster-control-plane\",destination_namespace=\"kube-system\",destination_node=\"drewcluster-control-plane\",instance=\"\",managed_by=\"\",name=\"\",part_of=\"\",source_address=\"172.18.0.2\",source_kind=\"pod\",source_name=\"kube-controller-manager-drewcluster-control-plane\",source_namespace=\"kube-system\",source_node=\"drewcluster-control-plane\",version=\"\"} 2960\nbytes_recv{component=\"kube-controller-manager\",destination_address=\"172.18.0.2:38256\",destination_kind=\"pod\",destination_name=\"kube-controller-manager-drewcluster-control-plane\",destination_namespace=\"kube-system\",destination_node=\"drewcluster-control-plane\",instance=\"\",managed_by=\"\",name=\"\",part_of=\"\",source_address=\"172.18.0.2\",source_kind=\"pod\",source_name=\"kube-controller-manager-drewcluster-control-plane\",source_namespace=\"kube-system\",source_node=\"drewcluster-control-plane\",version=\"\"} 295276\nbytes_recv{component=\"kube-controller-manager\",destination_address=\"172.18.0.2:38258\",destination_kind=\"pod\",destination_name=\"kube-controller-manager-drewcluster-control-plane\",destination_namespace=\"kube-system\",destination_node=\"drewcluster-control-plane\",instance=\"\",managed_by=\"\",name=\"\",part_of=\"\",source_address=\"172.18.0.2\",source_kind=\"pod\",source_name=\"kube-controller-manager-drewcluster-control-plane\",source_namespace=\"kube-system\",source_node=\"drewcluster-control-plane\",version=\"\"} 178\nbytes_recv{component=\"kube-controller-manager\",destination_address=\"172.18.0.2:38446\",destination_kind=\"pod\",destination_name=\"kube-controller-manager-drewcluster-control-plane\",destination_namespace=\"kube-system\",destination_node=\"drewcluster-control-plane\",instance=\"\",managed_by=\"\",name=\"\",part_of=\"\",source_address=\"172.18.0.2\",source_kind=\"pod\",source_name=\"kube-controller-manager-drewcluster-control-plane\",source_namespace=\"kube-system\",source_node=\"drewcluster-control-plane\",version=\"\"} 276120\nbytes_recv{component=\"kube-controller-manager\",destination_address=\"172.18.0.2:38448\",destination_kind=\"pod\",destination_name=\"kube-controller-manager-drewcluster-control-plane\",destination_namespace=\"kube-system\",destination_node=\"drewcluster-control-plane\",instance=\"\",managed_by=\"\",name=\"\",part_of=\"\",source_address=\"172.18.0.2\",source_kind=\"pod\",source_name=\"kube-controller-manager-drewcluster-control-plane\",source_namespace=\"kube-system\",source_node=\"drewcluster-control-plane\",version=\"\"} 39315\nbytes_recv{component=\"kube-controller-manager\",destination_address=\"172.18.0.2:38460\",destination_kind=\"pod\",destination_name=\"kube-controller-manager-drewcluster-control-plane\",destination_namespace=\"kube-system\",destination_node=\"drewcluster-control-plane\",instance=\"\",managed_by=\"\",name=\"\",part_of=\"\",source_address=\"172.18.0.2\",source_kind=\"pod\",source_name=\"kube-controller-manager-drewcluster-control-plane\",source_namespace=\"kube-system\",source_node=\"drewcluster-control-plane\",version=\"\"} 122540\nbytes_recv{component=\"kube-controller-manager\",destination_address=\"172.18.0.2:38496\",destination_kind=\"pod\",destination_name=\"kube-controller-manager-drewcluster-control-plane\",destination_namespace=\"kube-system\",destination_node=\"drewcluster-control-plane\",instance=\"\",managed_by=\"\",name=\"\",part_of=\"\",source_address=\"172.18.0.2\",source_kind=\"pod\",source_name=\"kube-controller-manager-drewcluster-control-plane\",source_namespace=\"kube-system\",source_node=\"drewcluster-control-plane\",version=\"\"} 3382\n...\n```\n\nAs we see the bytes received by each connection is shown and the source IP is given. If there is a known pod, node or service with the same IP, the *source_name* and or *destination_name* is also given.\n\n\n## Grafana Demo\n\nThere is a pre-prepared Grafana dashboard so you can test out **kube-netc** yourself and visualize the reported stats.\n\n![Grafana Dashboard](grafana/grafana_demo_dashboard.png)\n\nMake sure to point Prometheus to the **kube-netc** exporter in your configuration by appending a new job to your *scrape_configs* in your *prometheus.yml*:\n```\n- job_name: 'kube-netc' \n    static_configs: \n    - targets: ['localhost:9655']\n```\n\nThen you can start Prometheus and import [the dashboard](grafana/grafana_kube_netc_demo.json) into Grafana.\n\n## Design\n\nPlease see the [DESIGN](DESIGN.md) for information on how kube-netc is structured.\n\n## Thanks\n\nSpecial thanks to Alban from Kinvolk for his assistance with implementing eBPF and DataDog for their eBPF library.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnirmata%2Fkube-netc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnirmata%2Fkube-netc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnirmata%2Fkube-netc/lists"}