{"id":13819839,"url":"https://github.com/k8spacket/k8spacket","last_synced_at":"2026-02-12T22:01:18.820Z","repository":{"id":42559628,"uuid":"510073690","full_name":"k8spacket/k8spacket","owner":"k8spacket","description":"k8spacket - collects TCP traffic and TLS connection metadata in the Kubernetes cluster using eBPF and visualizes in Grafana","archived":false,"fork":false,"pushed_at":"2025-01-24T17:42:25.000Z","size":222357,"stargazers_count":1050,"open_issues_count":2,"forks_count":52,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-04-06T19:09:16.852Z","etag":null,"topics":["bpf2go","cilium","ebpf","ebpf-programs","ebpf-tc","grafana","k8spacket","metrics","o11y","observability","packetsniffing","prometheus","tcp","tls","visualization"],"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/k8spacket.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-07-03T16:15:56.000Z","updated_at":"2025-04-06T09:17:20.000Z","dependencies_parsed_at":"2024-01-07T19:27:31.127Z","dependency_job_id":"70c1513e-ecd7-4fb8-808b-a7a14b6d4bd9","html_url":"https://github.com/k8spacket/k8spacket","commit_stats":{"total_commits":31,"total_committers":4,"mean_commits":7.75,"dds":"0.16129032258064513","last_synced_commit":"61e193601961907669ef6ccf65fe5f7ee38eb77e"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/k8spacket%2Fk8spacket","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/k8spacket%2Fk8spacket/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/k8spacket%2Fk8spacket/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/k8spacket%2Fk8spacket/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/k8spacket","download_url":"https://codeload.github.com/k8spacket/k8spacket/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248790529,"owners_count":21162029,"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":["bpf2go","cilium","ebpf","ebpf-programs","ebpf-tc","grafana","k8spacket","metrics","o11y","observability","packetsniffing","prometheus","tcp","tls","visualization"],"created_at":"2024-08-04T08:00:53.742Z","updated_at":"2026-02-12T22:01:18.759Z","avatar_url":"https://github.com/k8spacket.png","language":"Go","readme":"# k8spacket - packets traffic visualization for kubernetes \n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://killercoda.com/k8spacket/scenario/k8spacket\" target=”_blank”\u003e\u003cimg alt=\"try on killercoda\" src=\"docs/try-on-killercoda.png\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n## What's new in version 2.0.0\n\n`k8spacket` doesn't use the `gopacket` library nowadays and is fully based on ![docs/ebpf.png](docs/ebpf.png) now!\\\nRead the article on medium.com *[k8spacket — a fully based on eBPF right now](https://medium.com/@bareckidarek/k8spacket-a-fully-based-on-ebpf-right-now-e72d5383c743)*\n\nIt uses\n- `inet_sock_set_state` tracepoint to get information about TCP connections inside the cluster\n- traffic control and queueing discipline filters on ingress and egress to collect information about TLS handshake process \n\nTo use `k8spacket v2.x.x`, the minimum required kernel version is **5.8**\n\nNew features:\n- Dashboard `k8spacket - TLS certificate expiration` shows the remaining time until the certificates expire. By variable `Past interval to analyze`, you can narrow or expand the scope of data to analyze. Data sorted by expiring earliest first. It's easy to build alerts based on the certificate expiration date. See more raw metrics in the dashboard `k8spacket - TLS metrics`\n\n![docs/expiration.gif](docs/expiration.gif)\n- Two principal `k8spacket` dashboards (`k8spacket - node graph` and `k8spacket - TLS connections \u0026 certificates`) are sensitive to Grafana time range control now. You can show cluster TCP traffic or TLS connections, f.e., for the last 5 minutes\n\n![docs/timerange1.gif](docs/timerange1.gif)\n\n---\n![docs/timerange2.gif](docs/timerange2.gif)\n\n---\n## What's new in version 1.1.0\n\n- `tls-parser` plugin can get information about the server certificate chain (TLS versions less than 1.3)\n- dashboard about TLS connections has changed to show server certificate chain details (depends on `marcusolsson-json-datasource` and `marcusolsson-dynamictext-panel` Grafana plugins)\n\n![docs/tls_cert.gif](docs/tls_cert.gif)\n\n---\n## What's new in version 1.0.0\n\n- architecture of k8spacket changed to use `go plugins` (see available plugins here: https://github.com/k8spacket/plugins)\n- added the plugin with metrics about the TLS handshake process inside and outside the cluster (TLS version and cipher suite used)\n- added a dashboard with TLS metrics\n\n![docs/tls.gif](docs/tls.gif)\n\n- added a dashboard about TLS connections\n  - IP and name of TLS client\n  - domain, IP, and port of TLS server\n  - supported TLS versions and cipher suites by the client\n  - chosen TLS version and cipher suite by the server\n\n![docs/tls.png](docs/tls.png)\n\n---\n\n`k8spacket` helps to understand TCP packets traffic in your kubernetes cluster:\n\n- shows traffic between workloads in the cluster\n- informs where the traffic is routed outside the cluster\n- displays information about closing sockets by connections\n- shows how many bytes are sent/received by workloads\n- calculates how long the connections are established\n- displays the net of connections between workloads in the whole cluster\n\n`k8spacket` uses Node Graph API Grafana datasource plugin. See details [Node Graph API plugin](https://grafana.com/grafana/plugins/hamedkarbasi93-nodegraphapi-datasource)\n\n## Installation\n\nInstall `k8spacket` using helm chart (https://github.com/k8spacket/k8spacket-helm-chart)\n\n```bash\n  helm repo add k8spacket https://k8spacket.github.io/k8spacket-helm-chart\n  helm repo update\n  \n  helm install k8spacket --namespace k8spacket k8spacket/k8spacket --create-namespace\n```\n\nAdd `Node Graph API` and `JSON API` plugins and datasources to your Grafana instance. You can do it manually or change helm values for the Grafana chart, e.g.:\n```yaml\n\ngrafana:\n  env:\n    GF_INSTALL_PLUGINS: hamedkarbasi93-nodegraphapi-datasource,marcusolsson-json-datasource,marcusolsson-dynamictext-panel\n  datasources:\n    nodegraphapi-plugin-datasource.yaml:\n      apiVersion: 1\n      datasources:\n        - name: \"Node Graph API\"\n          jsonData:\n            url: \"http://k8spacket.k8spacket.svc.cluster.local:8080/nodegraph\"\n          access: \"proxy\"\n          basicAuth: false\n          isDefault: false\n          readOnly: false\n          type: \"hamedkarbasi93-nodegraphapi-datasource\"\n          typeLogoUrl: \"public/plugins/hamedkarbasi93-nodegraphapi-datasource/img/logo.svg\"\n          typeName: \"node-graph-plugin\"\n          orgId: 1\n          version: 1\n    marcusolsson-json-datasource.yaml:\n      apiVersion: 1\n      datasources:\n        - name: \"JSON API\"\n          url: \"http://k8spacket.k8spacket.svc.cluster.local:8080/tlsparser/api/data\"\n          access: \"proxy\"\n          basicAuth: false\n          isDefault: false\n          readOnly: false\n          type: \"marcusolsson-json-datasource\"\n          typeLogoUrl: \"public/plugins/marcusolsson-json-datasource/img/logo.svg\"\n          typeName: \"json-api-plugin\"\n          orgId: 1\n          version: 1\n```\n\nFill [additional scrape config](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#scrape_config) to observe Prometheus metrics:\n```yaml\n    - job_name: \"k8spacket-metrics\"\n      metrics_path: /metrics\n      scrape_interval: 25s\n      static_configs:\n      - targets: [k8spacket.k8spacket.svc.cluster.local:8080]\n```\n\nAdd dashboards configmap to Grafana stack\n\n```bash\n  kubectl -n $GRAFANA_NS apply --recursive -f ./dashboards\n```\n\n## Usage\n\nGo to `k8spacket - node graph` in Grafana Dashboards and use filters as below\n\n### Select graph mode (connection, bytes, duration)\n\n![docs/graphmode.gif](docs/graphmode.gif)\n\n### Filter by namespace\n\n![docs/namespace.gif](docs/namespace.gif)\n\n### Filter by include or exclude workflow name\n\n![docs/includeexclude.gif](docs/includeexclude.gif)\n\n","funding_links":[],"categories":["visualization"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fk8spacket%2Fk8spacket","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fk8spacket%2Fk8spacket","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fk8spacket%2Fk8spacket/lists"}