Learn App Definition and Development / Application Definition & Image Build

Technology Guide

mirrord

License: MIT

mirrord Logo

Field Guide

Complete Guide

mirrord is an open-source tool from MetalBear that connects a locally-running process to a remote Kubernetes pod so the local process sees the remote pod’s traffic, environment, and filesystem. The developer keeps their debugger, hot reload, and IDE on their laptop while the code behaves as if it were running in the cluster.

When mirrord starts a target process it injects a shared library via LD_PRELOAD (or the equivalent on macOS) that hooks network, filesystem, and environment syscalls. Those calls are forwarded over a websocket to a mirrord-agent pod that mirrord schedules onto the same node as the target pod, entering its network and PID namespaces. From there the agent can mirror incoming traffic to the local process (leaving the remote pod still serving real users), steal traffic outright, read the remote pod’s file system, and expose its environment variables and DNS resolver. Outgoing connections from the local process are tunnelled back out through the agent so they resolve cluster-internal service names correctly.

mirrord competes with Telepresence and Skaffold’s port-forward + sync workflow; its distinguishing feature is syscall-level hooking that requires no changes to the application or cluster, and the ability to mirror rather than hijack traffic during debugging.

CNCF Project

Cloud Native Computing Foundation

No articles found for mirrord yet. Check back soon!