Quick Start
This guide will help you deploy Mermin on a local Kubernetes cluster using kind (Kubernetes in Docker) in just a few minutes. By the end, you'll have Mermin capturing network flows and displaying them in your terminal.
Prerequisites
Before starting, ensure you have the following tools installed:
Docker: Container runtime
kind: Kubernetes in Docker
kubectl: Kubernetes command-line tool
Helm: Kubernetes package manager (version 3.x)
Make:
On Mac systems
makeis available via "Xcode Command Line Tools" -xcode-select --installOn Ubuntu/Debian run
sudo apt-get update && sudo apt-get install --no-install-recommends makeOn RedHat-based systems run
sudo yum install make
Step 1: Create a kind Cluster
Create a local Kubernetes cluster using kind:
# Create a kind configuration file
cat <<EOF > kind-config.yaml
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
name: atlantis
nodes:
- role: control-plane
- role: worker
- role: worker
EOF
# Create the cluster
kind create cluster --config kind-config.yamlThis 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
Now let's view the network flows Mermin is capturing:
You should see flow records in a human-readable format. Let's generate some traffic to see more flows:
Switch back to the logs terminal, and you'll see network flow records for the traffic you just generated, 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 6: 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.
Cleanup
When you're done experimenting, clean up the resources:
Next Steps
Congratulations! You've successfully deployed Mermin and captured network flows.
To use Mermin in production:
Review the Architecture to understand how Mermin works
Explore Deployment Options for production-ready configurations
Configure OTLP Export to send flows to your observability backend
Set Up Integrations with Grafana, Elastic, or other platforms
Customize Configuration to match your environment and requirements
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
Last updated