Writing Skills
writing-skills
效率与协作技能,来自 obra/superpowers,查看原文获取完整用途和操作说明。
mirrord【部署与运维】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.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
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.
kubectl cluster-info
kubectl get pods -A | head -5
If this fails, help the user configure kubectl first.
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
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.
mirrord exec --target deployment/<name> -- env
The output should include the pod's environment variables.
mirrord exec --target deployment/orders -- npm test
mirrord exec --target deployment/api -- python main.py