netshoot
11,091
Stars
—
Forks
0
Watchers
—
Open Issues
待补全
许可证
Shell
语言
—
创建时间
最近更新
项目能做什么
用于 Docker 和 Kubernetes 网络故障排查的瑞士军刀式容器镜像。
来源:基于仓库元数据
· 内容以仓库实际 README 为准
使用说明 查看原始 README 原仓库文档
中文使用说明暂未生成。下面保留原仓库 README 摘录,命令与配置均以原文为准。
原始 README 摘录(英文原文,节选前 3000 字符)
## netshoot: a Docker + Kubernetes network trouble-shooting swiss-army container
<p align="center">
<img src="img/netshoot.jpg" alt="netshoot" width="320">
</p>
## Quick Start
```bash
# Share a running container's network namespace
docker run -it --net container:<container_name> nicolaka/netshoot
# Use the host's network namespace
docker run -it --net host nicolaka/netshoot
# Ephemeral debug container in Kubernetes
kubectl debug <pod> -it --image=nicolaka/netshoot
# Prefer a digest in production debug sessions
docker run -it --rm nicolaka/netshoot@sha256:<digest>
```
## Why netshoot
Docker and Kubernetes isolate every container in its own **network namespace** — its own interfaces, routes, and IP stack. netshoot exploits the fact that you can _enter_ any namespace without modifying what's running inside it.
- **Debug a container** without installing tools into its image
- **Debug a host** without installing anything on it
- **Debug in Kubernetes** as an ephemeral container, throwaway pod, or sidecar
## Launch Options
### Docker
```bash
# Enter a specific container's namespace
docker run -it --net container:<container_name> nicolaka/netshoot
# Enter the host's namespace
docker run -it --net host nicolaka/netshoot
# Enter a Docker bridge network's namespace via nsenter
docker run -it --rm \
-v /var/run/docker/netns:/var/run/docker/netns \
--privileged \
nicolaka/netshoot
# then: nsenter --net=/var/run/docker/netns/<id> sh
```
### Docker Compose
See [`configs/netshoot-compose.yaml`](configs/netshoot-compose.yaml) for a Compose file that shares another service's network namespace and writes a pcap:
```bash
docker compose -f configs/netshoot-compose.yaml up
```
### Kubernetes
```bash
# Ephemeral container in a running pod (non-destructive)
kubectl debug <pod> -it --image=nicolaka/netshoot
# Throwaway pod
kubectl run tmp-shell --rm -i --tty --image nicolaka/netshoot
# Throwaway pod on the host's network namespace
kubectl run tmp-shell --rm -i --tty \
--overrides='{"spec": {"hostNetwork": true}}' \
--image nicolaka/netshoot
# Sidecar in a Deployment
kubectl apply -f configs/netshoot-sidecar.yaml
kubectl exec -it <pod> -c netshoot -- zsh
```
#### kubectl plugin
The [kubectl-netshoot plugin](https://github.com/nilic/kubectl-netshoot) wraps the above into ergonomic subcommands:
```bash
kubectl netshoot run tmp-shell # throwaway pod
kubectl netshoot debug my-pod # ephemeral container
kubectl netshoot debug node/my-node # node debug session
```
---
## Troubleshooting Scenarios
### DNS resolution failures
_Pod can't reach a service by name, or DNS lookups are slow/timing out._
```bash
# 1. Check what DNS server the container is using
cat /etc/resolv.conf
# 2. Resolve a Kubernetes service name
drill kubernetes.default.svc.cluster.local
# 3. Query the cluster DNS directly (bypass resolv.conf)
drill @10.96.0.10 kubernetes.default.svc.cluster.local
# 4. Capture DNS traffic to see what's actually
阅读完整原文
项目深度分析 规则生成(AI 未配置)
综合评分 44.5 分。该项目在“个人可实施性”维度得 35 分,“付费可能性”维度得 20.0 分,差异化空间 70.0 分(评分依据见评分卡)。
面向细分需求的二次开发产品
| 产品构想 | 基于 netshoot 的核心能力,聚焦一个更窄的场景(如某平台、某行业)做差异化。 |
| 目标用户 | 该细分场景用户 |
| 难度/周期 | 中 · 2~6 周 |
| 收费模式 | 买断制 / 订阅制 / 广告 |
| 竞争风险 | 细分需求规模需验证 |
| 依据 | AI 推测:基于项目主题标签的判断 |
以上为规则引擎基于仓库公开数据生成的参考结论,包含推测成分,不构成投资或创业承诺;配置 AI 后可获得更深入的分析。
报告会保存到 个人中心
竞品与相似项目 GitHub Search 真实检索
| 项目 | 中文简介 | Stars | 语言 |
|---|---|---|---|
| nilic/kubectl-netshoot | 中文介绍暂未生成 kubectl plugin for spinning up netshoot container for networ |
232 | Go |
| sadeepa24/netshoot | 中文介绍暂未生成 Netshoot – A versatile tool for discovering hosts and identi |
7 | Go |
| tuananh/netshoot | 中文介绍暂未生成 A port of https://github.com/nicolaka/netshoot Docker + Kube |
6 | - |
| halationer/NetShootGame | 中文介绍暂未生成 第三人称局域网射击游戏 - UE4.27(源码版本)练习项目 |
5 | C++ |
| josemzr/netshoot-ova | 中文介绍暂未生成 | 3 | Shell |
以上为通过 GitHub 官方 Search API 检索的相似项目,功能差异与优劣势需进一步人工确认,配置 AI 后可生成对比分析。
项目优势与风险
| 技术成熟度 | 创建时间待补全,最近推送 |
| 社区活跃 | Star 11,091 / Fork 0 / Issue 0(数据支持,可自行核实) |
| 许可证 | 未检测到(需人工确认) |
| 主要风险 | 上游项目方向可能变化;同赛道竞争者较多(见竞品表);热度与需求不完全等价 |
安装与使用
此项目未提供 Docker 镜像,安装步骤以原仓库 README 为准(涉及依赖安装与环境配置,对新手门槛较高)。