Quickstart Guide
Deploy Mermin on a local Kubernetes cluster using kind (Kubernetes in Docker). By the end of this guide, Mermin will be capturing network flows and displaying them in your terminal.
This quick start is designed for local testing and development. For production deployments, see the Deployment Guide.
System Requirements
Before deploying Mermin, verify your environment meets these requirements:
Linux Kernel
5.14+
6.6+
Must have BTF (BPF Type Format) enabled
Kubernetes
1.20+
1.28+
Any conformant distribution
Helm
3.x
3.12+
Kubernetes package manager
Container Runtime
Any
Docker/containerd
Must support privileged containers
eBPF Requirements: Mermin requires a Linux kernel with eBPF and BTF support. Most modern distributions (Ubuntu 20.04+, RHEL 9.2+, Debian 11+) meet these requirements. Older kernels may produce verifier errors.
Verify Your Environment
Run these commands on your Kubernetes nodes (or inside kind) to verify eBPF support:
# Check kernel version (must be 5.14+)
uname -r
# Verify BTF support (file must exist)
ls -la /sys/kernel/btf/vmlinux
# Check eBPF filesystem (should be mounted)
mount | grep bpfPrerequisites
Install these tools before proceeding:
Docker: Container runtime
kind: Kubernetes in Docker
kubectl: Kubernetes command-line tool
Helm: Kubernetes package manager (version 3.x)
Step 1: Create a kind Cluster
Create a local Kubernetes cluster using kind:
This creates a cluster with one control plane node and two worker nodes, providing multiple nodes to observe inter-node network traffic.
Verify the cluster is running:
You should see three nodes in the Ready state.
Step 2: Deploy Mermin with Helm
Deploy Mermin using the Helm chart with a configuration that outputs flows to stdout (for easy viewing):
This configuration outputs Flow Traces to stdout for quick verification. For production, configure an OTLP exporter to send data to your observability backend.
Step 3: Verify the Deployment
Check that the Mermin pods are running:
You should see one Mermin pod per worker node, all in the Running state:
Step 4: View Network Flow Data
View the network flows Mermin is capturing:
Flow records appear in a human-readable format. Generate some traffic to see more flows:
The logs terminal displays network flow records for the generated traffic, including:
Source and destination IP addresses and ports
Protocol (TCP, UDP, ICMP)
Packet and byte counts
Kubernetes metadata (pod name, namespace, labels)
Example flow record (stdout format):
Step 5: Explore Mermin Features (Optional)
Check Metrics
Mermin exposes Prometheus metrics. You can view them with:
Then in another terminal or browser, access http://localhost:10250/metrics.
View Kubernetes Metadata Enrichment
Create a deployment and service to see richer metadata:
The flow logs will now include metadata about the nginx deployment, service, and pods.
Explore Essential Configuration Options
To view flows with Kubernetes metadata enrichment, Mermin requires four core configuration blocks: Network Interface Discovery, Kubernetes Informer, Flow-to-Kubernetes Attribute Mapping & Export.
A minimal example configuration is available here: Example Configuration, for a more comprehensive example, please see the Default Config
Network Interface Discovery
CNI-Specific Patterns:
Default:
What you'll see: All pod-to-pod traffic (inter-node and intra-node) What you'll miss: Traffic on other CNI-specific interfaces not listed Use cases: Fine-tuning for specific CNI setups, reducing monitored interface count
Mermin's goal is to show you pod-to-pod traffic which is exposed by Virtual Ethernet Devices, which match patterns like "veth*", "gke*", "cali*". Currently, bridge interfaces like "tun*" or flannel* are ignored, because Mermin does not support parsing tunneled/encapsulated traffic. This feature will come very soon.
Physical Interfaces Only:
Most of the traffic on the physical interfaces will be ignored, because Mermin currently lacks support for tunneled/encapsulated traffic.
Monitor only physical network interfaces for inter-node traffic:
What you'll see: Inter-node pod traffic, node-to-node traffic, external connections What you'll miss: Same-node pod-to-pod communication (never hits physical interfaces)
Trade-offs: Lower overhead (fewer interfaces), incomplete visibility, may cause flow duplication if combined with veth monitoring Use cases: Infrastructure-focused monitoring, cost-sensitive deployments, clusters with minimal same-node communication
For more information, please reference: Network Interface Discovery
Kubernetes Informer
Configures which Kubernetes resources Mermin watches to enrich network flows with metadata. This enables Mermin to associate IP addresses and ports with pod names, services, deployments, and other Kubernetes contexts.
For more information, please reference: Owner Relations & Selector Relations
Flow-to-Kubernetes Attribute Mapping
Configures how Mermin matches network flow data (source/destination IPs and ports) to Kubernetes resources. This mapping defines which Kubernetes object fields to extract and how to associate them with captured flows.
For more information, please reference: Flow Attributes
Exporter
Configures how Mermin exports network flow data. Flows can be sent to an OTLP receiver (OpenTelemetry Protocol) for storage and analysis, or output to stdout for debugging.
For more information, please reference: OTLP Exporter
Cleanup
Remove the resources when finished:
Troubleshooting
If you encounter issues:
Pods not starting: Check
kubectl describe pod <pod-name>for errorsNo Flow Traces: Verify network interfaces with
kubectl exec <pod-name> -- ip link showPermission errors: Ensure the SecurityContext allows privileged mode
See the Troubleshooting Guide for more help
Next Steps
Congratulations! You've successfully deployed Mermin and captured network flows.
Plan Your Production Deployment: Review resource requirements and security best practices
Configure Secure OTLP Export: Set up TLS and authentication
Connect to Your Observability Backend: Integrate with Grafana, Elastic, or Jaeger
Understand How Mermin Works: Deep-dive into the agent architecture
Explore Flow Trace Semantics: Learn what each attribute means
Configure Network Interfaces: Target specific interfaces for your CNI
Filter Flows Before Export: Reduce noise and focus on relevant traffic
Join the Community
Have questions or want to share how you're using Mermin?
GitHub Discussions: Ask questions and engage with the community
Report an Issue: Found a bug? Help us improve
Last updated