Kubeshark — API Traffic Viewer for Kubernetes
eBPF-powered, sidecar-free traffic viewer for Kubernetes that decodes HTTP, gRPC, Kafka, Redis and more across every pod in the cluster.
Instalación con revisión previa
Este activo requiere revisión. El prompt copiado pide dry-run, muestra escrituras y continúa solo tras confirmación.
npx -y tokrepo@latest install fbc1309f-38d6-11f1-9bc6-00163e2b0d79 --target codexPrimero dry-run, confirma las escrituras y luego ejecuta este comando.
What it is
Kubeshark is an open-source real-time API traffic viewer for Kubernetes. Think of it as Wireshark for your cluster -- it captures pod-to-pod, pod-to-service, and external traffic at the node level using eBPF and raw sockets, then decodes application protocols in a browser-based UI.
It is built for platform engineers, SREs, and developers who need to debug microservice communication without modifying workloads or installing service mesh sidecars. Kubeshark decodes HTTP/1.1, HTTP/2, gRPC, Kafka, Redis, AMQP, MongoDB wire protocol, DNS, and raw TCP.
How it saves time or tokens
Traditional Kubernetes traffic debugging involves adding sidecar proxies, enabling verbose logging in each service, or deploying a full service mesh. Kubeshark eliminates all of that. A single kubeshark tap command deploys a DaemonSet that immediately starts capturing traffic across all pods in the cluster.
The built-in query language (KFL) lets you filter traffic in real time, so you can isolate the exact API call causing issues without sifting through logs. You can also export to PCAP files for offline analysis in Wireshark.
How to use
- Install the CLI:
sh <(curl -Ls https://kubeshark.co/install). - Run
kubeshark tapagainst your current kube-context to capture traffic across all pods, or scope to a namespace withkubeshark tap -n my-ns. - Open the browser UI at
http://localhost:8899to view decoded traffic with filters.
Example
# Install the CLI
sh <(curl -Ls https://kubeshark.co/install)
# Tap all pods in the cluster
kubeshark tap
# Tap a specific namespace
kubeshark tap -n my-namespace
# Tap pods matching a pattern
kubeshark tap 'api-server.*'
# Open the UI at http://localhost:8899
# Use KFL to filter: http and request.path == '/api/v1/users'
Related on TokRepo
- DevOps tools -- infrastructure and operations tooling for cloud-native workflows
- Monitoring tools -- observability and monitoring solutions
Common pitfalls
- Kubeshark requires privileged DaemonSet pods with host network access; some managed Kubernetes providers restrict this by default.
- On high-traffic clusters, capturing all traffic can generate significant data volume -- use KFL filters or namespace scoping to reduce noise.
- eBPF-based capture requires a Linux kernel 4.16 or later; older kernels fall back to raw socket capture with reduced protocol support.
Preguntas frecuentes
No. Kubeshark operates independently of any service mesh. It captures traffic at the node level using eBPF and raw sockets, so you do not need Istio, Linkerd, or any sidecar proxy installed.
Kubeshark decodes HTTP/1.1, HTTP/2, gRPC, Kafka, Redis, AMQP, MongoDB wire protocol, DNS, and raw TCP. New protocol decoders can be added through the extension system.
Yes, but with care. Kubeshark captures traffic at the node level, which has minimal performance overhead. However, on very high-traffic clusters you should scope capture to specific namespaces or pod patterns to limit resource usage.
KFL (Kubeshark Filter Language) lets you filter captured traffic in real time using expressions like 'http and request.path contains /api'. It supports logical operators, field comparisons, and regex matching.
Yes. Kubeshark can record traffic to PCAP files that you can open in Wireshark or other network analysis tools for detailed offline investigation.
Referencias (3)
- Kubeshark GitHub— Kubeshark is an eBPF-powered API traffic viewer for Kubernetes
- Kubeshark Documentation— Decodes HTTP, gRPC, Kafka, Redis, AMQP, DNS protocols
- eBPF Foundation— eBPF for kernel-level network observability
Relacionados en TokRepo
Discusión
Activos relacionados
Kubernetes Gateway API — Next-Generation Service Networking for K8s
The Kubernetes Gateway API is the official successor to Ingress, providing expressive, extensible, and role-oriented routing for HTTP, gRPC, TCP, and TLS traffic in Kubernetes clusters.
Easegress — Cloud-Native Traffic Orchestration System
Easegress is a high-performance, cloud-native traffic orchestration platform written in Go that provides API gateway, load balancing, service mesh sidecar, and pipeline-based request processing with built-in resilience patterns.
Apache APISIX — Cloud Native High-Performance API Gateway
Apache APISIX is a dynamic, real-time, high-performance API gateway built on NGINX and etcd, offering rich traffic management with a large plugin ecosystem and sub-millisecond routing updates.
Jackett — Unified Torrent Indexer API for Media Automation
A proxy server that translates queries from media automation apps like Sonarr and Radarr into site-specific requests for torrent indexers, providing a single API interface.