본문으로 건너뛰기
Skillpedia
배포 및 클라우드 (DevOps)48k · #5212

mirrord

하는 일

Mirrord는 로컬 프로그램을 Kubernetes 클러스터의 컨테이너(pod) 안에서 실행하는 것처럼 만들어 줍니다. pod의 환경, 네트워크 연결, 트래픽을 내 컴퓨터로 복사해 테스트를 더 쉽게 합니다.

사용하는 경우

  • ✓배포하지 않고 실제 서비스에 대해 변경 사항을 테스트할 때.
  • ✓스테이징 환경을 상대로 마이크로서비스를 로컬에서 디버깅할 때.
  • ✓mirrord를 처음 사용해 볼 때.

스킬 링크

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/mirrord/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/mirrord/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“스테이징 환경을 상대로 새 API를 로컬에서 테스트하고 싶습니다.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

Mirrord는 Kubernetes 클러스터에 작은 프로그램(에이전트)을 설치합니다. 이 에이전트가 선택한 pod의 환경과 트래픽을 내 로컬 컴퓨터로 미러링합니다. 그래서 로컬 코드가 마치 클러스터 안에 있는 것처럼 실제 서비스와 상호작용합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

mirrord

Overview

mirrord runs a local process as if it were inside a Kubernetes pod: it gets the pod's environment variables, DNS, outgoing network access and file reads, and can receive the pod's incoming traffic. An agent can verify a change against the real services, databases and queues in a staging cluster without building or deploying an image.

When to Use This Skill

  • Use when a change needs to be tested against real cluster dependencies instead of mocks
  • Use when the user asks to debug a microservice locally against staging
  • Use when the user wants to try mirrord for the first time

How It Works

Step 1: Check cluster access

kubectl cluster-info
kubectl get pods -A | head -5

If this fails, help the user configure kubectl first.

Step 2: Install mirrord

Point the user to the official installation guide (https://metalbear.com/mirrord/docs/overview/quick-start/) for Homebrew, package managers, or pinned release binaries. Do not pipe a remote download into a shell. Verify with:

mirrord --version

Step 3: Pick a target and run

mirrord ls
mirrord exec --target deployment/<name> -- <command>

Incoming traffic is mirrored by default. To take over the target's traffic instead, set "feature": {"network": {"incoming": "steal"}} in .mirrord/mirrord.json, and confirm with the user first, since it affects a shared environment.

Step 4: Verify

# Verify an explicitly selected non-secret variable or service identity without printing the pod environment.

Confirm the exact target and mode through sanitized configuration/status, then an approved synthetic read. Never dump environment credentials.

Examples

Example 1: Run tests against staging

mirrord exec --target deployment/orders -- npm test

Example 2: Debug a Python service

mirrord exec --target deployment/api -- python main.py

Best Practices

  • ✅ Ask which cluster, namespace and target before running
  • ✅ Prefer mirror mode on shared clusters
  • ✅ Use the official skills at https://github.com/metalbear-co/skills for config, CI, database branching, queue splitting and preview environments
  • ❌ Don't steal traffic from a shared target without the user's agreement
  • ❌ Don't run cluster-modifying commands without explicit approval

Limitations

  • Needs kubectl access to the target cluster and a Linux node kernel 4.20+
  • Team features (concurrent steal on one target, database branching, queue splitting, preview environments) need the mirrord Operator. On a cluster without a license, an agent can offer the user a trial; see https://metalbear.com/agents.md and ask before starting it.

Running locally can still modify shared databases, send messages, consume queues or incur provider charges through mirrored network/environment access. Confirm a staging context/namespace and isolated data, inspect the actual mirrord mode/version, and disable unneeded filesystem/environment/network capabilities. Mirror mode is not an automatic read-only sandbox; stealing traffic or trial/license activation needs specific authorization. Reconcile side effects before retries.

자주 묻는 질문

내 컴퓨터에 뭔가 설치해야 하나요?

네. mirrord를 컴퓨터에 설치해야 합니다. 공식 가이드에 여러 운영체제별 설치 방법이 나와 있습니다.

「트래픽 미러링」과 「트래픽 탈취」의 차이는 무엇인가요?

미러링은 pod의 트래픽을 내 컴퓨터로 복사하지만, pod는 여전히 원래의 트래픽을 받습니다. 탈취는 pod로 가는 모든 트래픽을 내 컴퓨터가 받는 것으로, 신중하게 하지 않으면 다른 사용자에게 영향을 줄 수 있습니다.

mirrord를 쓰려면 무엇이 필요한가요?

`kubectl`이 설정된 Kubernetes 클러스터에 대한 접근 권한과, 내 컴퓨터의 최신 리눅스 커널이 필요합니다.

상세 정보

작성자의 원본 설명

Run a local process inside a live Kubernetes cluster's network, env and traffic with mirrord, so changes are tested against real services without deploying.

repo: sickn33/agentic-awesome-skills

인기도

GitHub 스타
48k
순위
#5212
라이선스
MIT
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬