返回目录

k8e

维护状态: 活跃

xiaods/k8e

开源的 Agentic AI 沙箱矩阵,基于 Kubernetes 的沙箱实验场。

前往 GitHub项目主页
$ curl -sfL https://k8e.sh/install.sh | sh -

482

星标

33

Fork

Go

语言

Apache-2.0

许可证

2020-09-03

创建于

2026-09-11

最近推送

Apache-2.0 许可、单二进制(<100MB)的 Kubernetes 发行版,面向 AI agent 的沙箱化代码执行;agent 通过独立的 k8e-sandbox-cli 与 /k8e-sandbox 技能接入。README 未提及 DeepSeek Harness,属生态级沙箱工具。

DSH 适配

生态相关

作者声明

安全审计

未审计

最后核验

2026-08-21

许可证

Apache-2.0

01它能帮你完成什么?

  • Let an AI coding agent execute generated code in isolated Kubernetes sandboxes

    Sandboxed runs via `k8e-sandbox-cli run` with auto session management — gVisor (default), Kata Containers or Firecracker isolation, per-session egress policy and ephemeral /workspace

    Platform and agent engineers who want zero-trust execution of agent-generated code (README lists claude code, codex and pi as supported agents)

  • Stand up a production-grade sandbox cluster quickly

    A CNCF-conformant Kubernetes cluster from a single binary under 100MB, up in ~60 seconds, with Sandbox Matrix starting automatically

    Infra teams that need agent-sandbox infrastructure without a full Kubernetes build-out

02如何接入 DeepSeek Harness?

前置条件

  • A sandbox runtime installed BEFORE K8E (recommended: gVisor — no KVM required; Kata Containers or Firecracker for stronger isolation)
  • wget available for downloading the gVisor runsc binaries

安装步骤

  1. 01

    Download runsc + containerd-shim-runsc-v1 from the gVisor release bucket, verify with sha512sum, then move both to /usr/local/bin/ (do not run `runsc install` — K8E manages its own containerd config)

  2. 02

    Install K8E: `curl -sfL https://k8e.sh/install.sh | sh -`

    $ curl -sfL https://k8e.sh/install.sh | sh -

  3. 03

    Download the platform-specific `k8e-sandbox-cli` binary from GitHub releases, chmod +x, and symlink it to the plain name `k8e-sandbox-cli`

  4. 04

    On the server create an API key: `k8e sandbox-apikey create my-agent`

  5. 05

    Connect and install the agent skill: `./k8e-sandbox-cli --endpoint <server-ip>:50051 --apikey k8e-... connect`

验证接入成功

  • export KUBECONFIG=/etc/k8e/k8e.yaml; kubectl get nodes
  • kubectl get runtimeclass — should show: gvisor
  • kubectl -n sandbox-matrix get pods — Sandbox Matrix starts automatically

03DSH 适配与能力边界

DSH 适配生态相关

K8E is a Kubernetes-native agentic sandbox matrix; the README makes no DeepSeek Harness/dsh claim — its /k8e-sandbox skill targets claude code, codex and pi harnesses via the standalone k8e-sandbox-cli

  • Pluggable hardware isolation

    agent sessions / podsgVisor (default, ~10ms boot), Kata Containers (~500ms) or Firecracker microVM (~125ms) isolation, auto-registered as RuntimeClass

    writes the gVisor stanza into its own containerd config at /var/lib/k8e/agent/etc/containerd/config.toml on startup
  • Per-session network egress control

    sandbox session with `allowed_hosts`Cilium eBPF `toFQDNs` egress enforcement per session, no proxy process needed

    network access restricted to the allowed host list (default: pypi.org, files.pythonhosted.org, registry.npmjs.org, objects.githubusercontent.com, github.com, raw.githubusercontent.com)
  • Agent skill via standalone CLI

    `k8e-sandbox-cli` (~44MB standalone binary) + API key`/k8e-sandbox` skill installed into the agent harness; run/create/destroy/read/write/session commands over gRPC (TLS)

    `connect` symlinks the binary to ~/.local/bin/k8e-sandbox-cli and installs the /k8e-sandbox skill into agent harnessesremote access requires a server-side API key (default TTL 30 days)
  • Ephemeral workspaces & resource governance

    agent session lifecycleauto-cleaned per-session /workspace, CPU/memory caps per agent session, warm pool with sub-500ms session claim latency

04适合谁?何时不该用?

适合

  • Platform and agent engineers who want zero-trust execution of agent-generated code (README lists claude code, codex and pi as supported agents)
  • Infra teams that need agent-sandbox infrastructure without a full Kubernetes build-out

不适合

  • The README does not document DeepSeek Harness (dsh) support: the /k8e-sandbox skill explicitly targets claude code, codex and pi harnesses, so DSH users should treat K8E as an ecosystem tool until DSH support is published.
  • The server-side install flow (install.sh piped to sh, systemd service, /etc/k8e paths) implies a Linux server environment, while the sandbox CLI ships for darwin/linux/windows; Firecracker additionally requires /dev/kvm.

05兼容性、维护与安全提示

  • The README does not document DeepSeek Harness (dsh) support: the /k8e-sandbox skill explicitly targets claude code, codex and pi harnesses, so DSH users should treat K8E as an ecosystem tool until DSH support is published.
  • The server-side install flow (install.sh piped to sh, systemd service, /etc/k8e paths) implies a Linux server environment, while the sandbox CLI ships for darwin/linux/windows; Firecracker additionally requires /dev/kvm.
  • Installation downloads binaries from the network (gVisor release bucket, GitHub releases, k8e.sh install script), and sandbox sessions have restricted egress — default allowlist only, custom hosts require `--allowed-hosts` / `--cilium-dns-proxy`.
2020-09-032026-08-19v1.35.5-20260820-rc3+k8e1

Apache-2.0 · actively maintained (latest release v1.35.5-20260820-rc3+k8e1, 2026-08-20)

06常见问题

k8e 是否直接支持 DeepSeek Harness?

README 没有记载 DeepSeek Harness(dsh)的支持。其 /k8e-sandbox 技能通过 `k8e-sandbox-cli connect` 安装到 agent harness 中,README 明确列出的支持对象是 claude code、codex 和 pi。任何能调用 `k8e-sandbox-cli` shell 命令的 harness 都可以按同样方式使用该沙箱。

K8E 如何安装?

一条命令即可:`curl -sfL https://k8e.sh/install.sh | sh -`。K8E 是把 CNCF 一致性认证的 Kubernetes 打包进单个不到 100MB 二进制的发行版,约 60 秒即可就绪。建议先安装 gVisor 运行时 shim,以获得推荐的默认隔离。

有哪些沙箱隔离方式可选?

可插拔运行时:gVisor(默认,系统调用拦截,约 10ms 启动,无需 KVM)、Kata Containers(虚拟机隔离,约 500ms)和 Firecracker microVM(约 125ms,需要 /dev/kvm)。K8E 会自动检测已安装的运行时并注册对应的 RuntimeClass。

沙箱内的网络流量会去哪里?

出站流量按会话通过 Cilium eBPF `toFQDNs` 策略强制执行。默认允许列表为 pypi.org、files.pythonhosted.org、registry.npmjs.org、objects.githubusercontent.com、github.com 和 raw.githubusercontent.com;自定义主机用 `--allowed-hosts` 设置。

如何验证安装成功?

执行 `kubectl get nodes`、`kubectl get runtimeclass`(应显示 gvisor)以及 `kubectl -n sandbox-matrix get pods`——Sandbox Matrix 会自动启动。KUBECONFIG 位于 /etc/k8e/k8e.yaml。

08数据与来源

  • 作者声明github.comf015f8d193e9…

    Supported agents: **claude code**, **codex**, **pi**.

  • 作者声明github.comf015f8d193e9…

    🔄 **SKILL + CLI** | AI agents (claude code, codex, pi) connect via `k8e-sandbox-cli` CLI commands

页面基于项目公开文档、仓库元数据和 DSH Plugins 的结构化解析生成;最后核验于 2026-08-21。发现错误?提交更正。

🏆

最佳 DeepSeek Harness 插件

从全目录挑出的 12 个值得优先安装的插件,覆盖各个分类。

DSH Plugins 是独立的 DeepSeek Harness 插件市场,与 DeepSeek 官方无关,也不代表官方背书。第三方插件未经安全审计,安装前请审查源码。

每周获取最新的 DeepSeek Harness 插件,绝不滥发。