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.
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):
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
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