githubEdit

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:

  • Dockerarrow-up-right: Container runtime

  • kindarrow-up-right: Kubernetes in Docker

  • kubectlarrow-up-right: Kubernetes command-line tool

  • Helmarrow-up-right: Kubernetes package manager (version 3.x)

  • Make:

    • On Mac systems make is available via "Xcode Command Line Tools" - xcode-select --install

    • On Ubuntu/Debian run sudo apt-get update && sudo apt-get install --no-install-recommends make

    • On RedHat-based systems run sudo yum install make

circle-info

This quick start is designed for local testing and development. For production deployments, see the Deployment Guide.

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.yaml

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

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:

  1. Review the Architecture to understand how Mermin works

  2. Explore Deployment Options for production-ready configurations

  3. Configure OTLP Export to send flows to your observability backend

  4. Set Up Integrations with Grafana, Elastic, or other platforms

  5. Customize Configuration to match your environment and requirements

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

Last updated