githubEdit

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.

circle-info

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:

Requirement
Minimum
Recommended
Notes

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

circle-exclamation

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 bpf

Prerequisites

Install these tools before proceeding:

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

circle-info

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 Configurationarrow-up-right, for a more comprehensive example, please see the Default Configarrow-up-right

chevron-rightNetwork Interface Discoveryhashtag

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

circle-info

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:

circle-exclamation

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

chevron-rightKubernetes Informerhashtag

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

chevron-rightFlow-to-Kubernetes Attribute Mappinghashtag

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

chevron-rightExporterhashtag

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 errors

  • No Flow Traces: Verify network interfaces with kubectl exec <pod-name> -- ip link show

  • Permission 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.

  1. Plan Your Production Deployment: Review resource requirements and security best practices

  2. Configure Secure OTLP Export: Set up TLS and authentication

  3. Connect to Your Observability Backend: Integrate with Grafana, Elastic, or Jaeger

Join the Community

Have questions or want to share how you're using Mermin?

Last updated