Categorygithub.com/honeycombio/honeycomb-network-agent
repositorypackage
0.2.1-beta
Repository: https://github.com/honeycombio/honeycomb-network-agent.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# README

Honeycomb Network Agent for Kubernetes

OSS Lifecycle

The Honeycomb Network Agent is a low effort, no-code, language agnostic solution to getting telemetry of your applications running in Kubernetes.

Docker images are found in ghcr.io/honeycombio/network-agent:latest.

See notes on local development in DEVELOPING.md

How it Works

The agent runs as a DaemonSet on each node in a Kubernetes cluster. It captures raw network packets from the network interface that is shared by all resources on the node (Pods, Daemonsets, etc). Captured network packets are reassembled into whole payloads and then parsed into known application level formats (eg HTTP). Parsed payloads are converted into events and then sent to Honeycomb.

Events include network level information such as source & destination IPs and port numbers, kubernetes information such as source and destination Pod names, and application level format specific information such as HTTP method and response status code.

design diagram

The agent generates events per Kubernetes host by inspecting network traffic, in the perspective of either the receiving or sending process. Amongst the scenarios events are generated for:

  • external to pod (cluster ingress)
  • pod to service
  • pod to pod
  • pod to external (cluster egress)

NOTE: For pod-to-pod interactions when each pod is on separate Kubernetes nodes, two events will be created.

Getting Started (Quickstart)

Requirements

Setup

Create Honeycomb namespace for the agent to run in:

kubectl create namespace honeycomb

Create Honeycomb secret for HONEYCOMB_API_KEY environment variable so it can be passed into the agent:

export HONEYCOMB_API_KEY=mykey
kubectl create secret generic honeycomb --from-literal=api-key=$HONEYCOMB_API_KEY --namespace=honeycomb

Configuration

The network agent can be configured using the following environment variables.

Environment VariableDescriptionDefaultRequired?
HONEYCOMB_API_KEYThe Honeycomb API key used when sending events`` (empty)Yes
HONEYCOMB_API_ENDPOINTThe endpoint to send events tohttps://api.honeycomb.ioNo
HONEYCOMB_DATASETDataset where network events are storedhny-network-agentNo
HONEYCOMB_STATS_DATASETDataset where operational statistics for the network agent are storedhny-network-agent-statsNo
LOG_LEVELThe log level to use when printing logs to consoleINFONo
DEBUGRuns the agent in debug mode including enabling a profiling endpoint using Debug AddressfalseNo
DEBUG_ADDRESSThe endpoint to listen to when running the profile endpointlocalhost:6060No
OTEL_RESOURCE_ATTRIBUTESExtra attributes to include on all events`` (empty)No
INCLUDE_REQUEST_URLInclude the request URL in eventstrueNo
HTTP_HEADERSCase-sensitive, comma separated list of headers to be recorded from requests/responses†User-Agent, TraceparentNo

†: When providing an override of a list of values, you must include in your override any defaults you wish to keep.

Run

kubectl apply -f examples/quickstart.yaml

Events should show up in Honeycomb in the hny-network-agent dataset.

Alternative options for configuration and running can be found in Deploying the agent to a Kubernetes cluster:

Supported Platforms

PlatformSupported
AKSSupported ✅
EKSSelf-managed hosts ✅
Fargate ❌
GKEStandard cluster ✅
AutoPilot ❌
Self-hostedUbuntu ✅

Requirements

  • Kubernetes version 1.24+
  • Linux Kernel 5.10+ with NET_RAW capabilities

Other versions may work but these are the minimum versions currently being tested.