Why mirrord Exists
Developing microservices locally is broken. Your service works on localhost but fails in Kubernetes because it depends on other services, databases, configs. mirrord lets you run local code as if it were inside the cluster — without deploying.
Install
brew install metalbear-co/mirrord/mirrord
# Or VS Code extension
code --install-extension MetalBear.mirrord
Run Local Code in Cluster Context
# Run your local process with cluster networking
mirrord exec --target pod/my-app-abc123 -- node server.js
# Or target a deployment
mirrord exec --target deployment/my-app -- python app.py
Your local process now:
- Receives traffic from the cluster
- Can access cluster DNS (other services, databases)
- Reads environment variables from the target pod
- Reads files from the target pod filesystem
Configuration
{
"target": {
"path": "deployment/my-app",
"namespace": "dev"
},
"feature": {
"network": {
"incoming": "mirror",
"outgoing": true,
"dns": true
},
"fs": "read",
"env": true
}
}
mirrord exec -f config.json -- ./my-app
Traffic Modes
- Mirror — copy incoming traffic to local (non-destructive)
- Steal — redirect traffic to local (for testing)
- Steal with filter — only redirect specific requests
{
"feature": {
"network": {
"incoming": {
"mode": "steal",
"http_filter": {
"header_filter": "x-debug: true"
}
}
}
}
}
IDE Integration
VS Code
- Install the mirrord extension
- Click the mirrord button in the status bar
- Select target pod/deployment
- Hit F5 — your debugger runs in cluster context
IntelliJ
- Install the mirrord plugin
- Enable mirrord in run configuration
- Debug as usual — breakpoints work with cluster traffic
Key Features
- No deployment needed — run local code with cluster context
- Traffic mirroring/stealing — test with real requests
- Env vars and files — inherited from target pod
- DNS resolution — access all cluster services by name
- IDE integration — VS Code, IntelliJ, GoLand
- Zero config — works out of the box for most setups
mirrord vs Alternatives
| Feature | mirrord | Telepresence | Port-forward |
|---|---|---|---|
| Traffic mirror | Yes | Yes | No |
| Steal filter | Header-based | Intercept | N/A |
| Env vars | Auto-imported | Manual | Manual |
| Setup | Zero | Agent install | kubectl |
| IDE support | VS Code, JetBrains | Limited | None |
Resources
Need to extract Kubernetes configs, service mesh data, or cluster metrics? Check out my Apify tools or email spinov001@gmail.com for custom solutions.
Top comments (0)