workspace/skills/kubeshark-traffic/SKILL.md
Kubeshark Kubernetes traffic analysis — L4/L7 deep packet inspection, TLS decryption, pcap export, flow analysis, service mapping (6 tools). Use when capturing Kubernetes pod traffic, debugging service-to-service latency, exporting pcaps from a cluster, or analyzing encrypted east-west traffic
npx skillsauth add automateyournetwork/netclaw kubeshark-trafficInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
| Property | Value |
|----------|-------|
| Source | kubeshark/kubeshark — MCP docs |
| Transport | Remote HTTP (JSON-RPC 2.0, default port 8898) |
| Language | Go (built into Kubeshark Hub) |
| Tools | 6 (capture, export pcap, snapshot, filter, L4 flows, flow summary) |
| Auth | None (cluster-internal); requires kubectl port-forward for remote access |
| Requires | Kubernetes cluster with Kubeshark installed via Helm |
# Install Kubeshark with MCP enabled
helm install kubeshark kubeshark/kubeshark \
--set mcp.enabled=true \
--set mcp.port=8898
# Port-forward for local access (if not in-cluster)
kubectl port-forward svc/kubeshark-hub 8898:8898
# MCP endpoint is now available at:
# http://localhost:8898/mcp
| Variable | Required | Example | Description |
|----------|----------|---------|-------------|
| KUBESHARK_MCP_URL | Yes | http://localhost:8898/mcp | Kubeshark MCP endpoint URL |
| KUBESHARK_MCP_PORT | No | 8898 | MCP server port (default: 8898) |
| Tool | Parameters | What It Does |
|------|-----------|-------------|
| capture_traffic | filter?, duration? | Start targeted packet capture across cluster pods |
| export_pcap | filter?, time_range? | Export captured traffic as pcap for Wireshark/tshark analysis |
| create_snapshot | filter? | Create point-in-time traffic snapshot within retention window |
| apply_filter | kfl_expression | Apply Kubeshark Filter Language (KFL) expressions to narrow results |
| list_l4_flows | filter? | List TCP/UDP flows with connection stats, RTT metrics, byte counts |
| get_l4_flow_summary | filter? | High-level summary: top talkers, protocol distribution, traffic volume |
When investigating connectivity or latency issues between Kubernetes services:
capture_traffic(filter="src.pod.name == 'frontend'") — start targeted capturelist_l4_flows — see all TCP/UDP connections with RTT and statsget_l4_flow_summary — identify top talkers and protocol breakdownapply_filter(kfl_expression="response.status >= 500") — isolate errorsexport_pcap(filter="dst.pod.name == 'api-gateway'") — export for deep analysispacket-analysis skill to analyze exported pcap with tsharkcapture_traffic(filter="dst.pod.name == 'api-gateway'", duration="5m")
list_l4_flows(filter="dst.pod.name == 'api-gateway'")
get_l4_flow_summary(filter="dst.pod.name == 'api-gateway'")
apply_filter(kfl_expression="response.latency > 500ms")
export_pcap(filter="response.latency > 500ms")
When investigating encrypted service-to-service communication:
capture_traffic — Kubeshark automatically decrypts TLS via eBPFapply_filter(kfl_expression="request.headers['content-type'] == 'application/grpc'") — isolate gRPClist_l4_flows — see encrypted connections with decrypted payload summariesexport_pcap — export decrypted traffic for offline analysisWhen performing post-incident traffic analysis:
create_snapshot — capture current traffic stateapply_filter with time range — find traffic around incident timelist_l4_flows — identify unusual connections or traffic spikesget_l4_flow_summary — find services with abnormal traffic volumeexport_pcap — preserve traffic for incident report| Skill | Integration | |-------|-------------| | packet-analysis | Export Kubeshark pcaps → analyze with Packet Buddy tshark (deeper protocol dissection) | | prometheus-monitoring | Correlate Kubeshark flow metrics with Prometheus time-series data | | grafana-observability | Cross-reference Kubeshark traffic patterns with Grafana dashboards and alerts | | pyats-health-check | Compare Kubernetes network traffic with underlying infrastructure health | | gait-session-tracking | Record all Kubeshark captures, exports, and analysis in GAIT audit trail | | servicenow-change-workflow | Reference Kubeshark traffic captures as evidence in change requests or incidents |
# Filter by pod name
src.pod.name == "frontend"
# Filter by namespace
dst.namespace == "production"
# HTTP status codes
response.status >= 400
# Latency threshold
response.latency > 200ms
# Protocol type
protocol == "grpc"
# Combined filters
src.namespace == "default" and response.status >= 500 and response.latency > 1s
# DNS queries
protocol == "dns" and request.query contains "api.internal"
# Kafka messages
protocol == "kafka" and request.topic == "orders"
kubectl port-forward svc/kubeshark-hub 8898:8898 when not in-clusterkubectl get pods -n kubeshark) and port-forward is active.mcp.enabled=true in Helm values; verify MCP port matches KUBESHARK_MCP_URL.testing
Human-in-the-loop escalation via HumanRail — route low-confidence agent decisions, pre-destructive operation approvals, and ambiguous incident tickets to real human engineers. Human answers are verified and returned as structured output. Workers are paid via Lightning Network. Use when the agent is uncertain, when a destructive change needs explicit human sign-off beyond a ServiceNow CR, or when an ambiguous ticket requires human triage before automated handling.
testing
Manage EVE-NG node lifecycle. Use when listing nodes, checking runtime state, creating or deleting nodes, starting or stopping nodes or whole labs, verifying node details, or wiping node NVRAM back to factory defaults.
development
Manage EVE-NG labs and platform inventory. Use when listing labs, checking lab metadata, creating or deleting labs, importing or exporting lab archives, checking EVE-NG health or auth, or verifying available node images before build work.
tools
Execute live CLI commands on running EVE-NG nodes over telnet console. Use when running show commands, making live config changes, verifying protocol state, testing connectivity, checking console readiness, or interacting with IOS, Junos, VPCS, EOS, or NX-OS nodes.