Skip to content

[Doc] Add llm-d Integration page to the Kubernetes deployment guide#2983

Open
tpiperatgod wants to merge 2 commits into
kvcache-ai:mainfrom
tpiperatgod:docs/llm-d-integration
Open

[Doc] Add llm-d Integration page to the Kubernetes deployment guide#2983
tpiperatgod wants to merge 2 commits into
kvcache-ai:mainfrom
tpiperatgod:docs/llm-d-integration

Conversation

@tpiperatgod

@tpiperatgod tpiperatgod commented Jul 17, 2026

Copy link
Copy Markdown
Member

Description

Adds a new page, llm-d Integration, to the Kubernetes Deployment Guide, documenting how Mooncake integrates with llm-d (vLLM-based serving on Kubernetes).

The content on this page is organized around three main sections:

  • vLLM connector contract — the single-node MooncakeStoreConnector command, the mooncake_config.json mode topology (embedded / standalone-store), and the PYTHONHASHSEED requirement.
  • KV cache offloading on K8s (llm-d) — defers deployment to llm-d's Tiered Prefix Cache guide and overlays, plus a note on how to verify the Mooncake offload path specifically (the upstream generic verification targets the native/LMCache filesystem tier, not Mooncake's).
  • P/D KV transfer (MooncakeConnector) — vLLM's runnable example, the routing-sidecar flags, and the distinction between the sidecar capability (present since v0.8.0) and a packaged Mooncake P/D path (reference-only; manifests need manual adaptation).

All llm-d references are pinned to v0.8.0. Field references defer to the upstream vLLM docs, the llm-d guide, and the Mooncake Store deployment guide.
Also wires the page into the guide's index.md (toctree + page list) and broadens the guide intro so the Store is framed as backing multiple orchestrators (SGLang/RBG and llm-d).

Two files, ~79 lines added; no existing pages rewritten. The canonical kv-cache-storage.md / vllm-mooncakestoreconnector.md pages are untouched.

Module

  • Transfer Engine (mooncake-transfer-engine)
  • Mooncake Store (mooncake-store)
  • Mooncake EP (mooncake-ep)
  • Mooncake PG (mooncake-pg)
  • Integration (mooncake-integration)
  • P2P Store (mooncake-p2p-store)
  • Python Wheel (mooncake-wheel)
  • Common (mooncake-common)
  • Mooncake RL (mooncake-rl)
  • CI/CD
  • Docs
  • Other

Type of Change

  • Bug fix
  • New feature
  • Refactor
  • Breaking change
  • Documentation update
  • Performance improvement
  • Other

How Has This Been Tested?

Docs-only change; validated by building the Sphinx site and previewing the rendered page.

Test commands:

cd docs
make clean && make html
python -m http.server -d build/html/ 9000   # manual preview

Test results:

  • Sphinx build succeeds; 0 warnings/errors on the changed page (and 0 total in this environment). No MyST, anchor, or cross-reference warnings.
  • pre-commit on the two changed files: trailing-whitespace, end-of-file-fixer, and codespell pass; no files rewritten. The mooncake-code-format (clang-format) hook is not applicable to Markdown and did not run here (clang-format-20 unavailable in this environment).
  • Manually previewed the page and verified the toctree/sidebar entry and all intra-page and cross-page links.
  • Unit tests pass — N/A (documentation only)
  • Integration tests pass (if applicable) — N/A
  • Manual testing done (Sphinx build + rendered-page review)

Checklist

  • I have performed a self-review of my own code
  • I have formatted my code using ./scripts/code_format.sh — N/A (Markdown only; the script formats C++/Python)
  • I have run pre-commit run --all-files and all hooks pass — ran pre-commit run --files <changed docs> instead (per docs/AGENTS.md, to avoid unrelated rewrites); docs-relevant hooks pass, see above
  • I have updated the documentation (if applicable)
  • I have added tests to prove my changes are effective — N/A (docs)
  • For changes >500 LOC: I have filed an RFC issue — N/A (~79 LOC)

AI Assistance Disclosure

  • No AI tools were used
  • AI tools were used (specify below)

AI tools (Claude Code, Claude Opus) drafted the page and its wording. Facts were verified against upstream sources (vLLM MooncakeStoreConnector / MooncakeConnector docs, llm-d v0.8.0 guide, overlays, and llm-d-router sidecar source). A separate AI review pass surfaced accuracy issues (e.g., the MultiConnector/sidecar matching rule and the mode-vs-SSD-offload distinction), which were re-checked against upstream and corrected. The human submitter is responsible for understanding and defending every line.

Document Mooncake's two integration points with llm-d as a link-first
reference across three layers (vLLM connector, Mooncake storage, llm-d
packaging):
- vLLM connector contract — the single-node MooncakeStoreConnector command,
  the mooncake_config.json mode topology (embedded/standalone-store), and the
  PYTHONHASHSEED requirement.
- KV cache offloading on K8s — deferred to llm-d's Tiered Prefix Cache guide
  and overlays, with a note on how to verify the Mooncake offload path
  specifically.
- P/D KV transfer — vLLM's runnable MooncakeConnector example, the sidecar
  flags, and the capability-vs-packaged-path distinction.

Pinned to llm-d v0.8.0; field references defer to the upstream vLLM docs,
llm-d guide, and Mooncake store guide.
…guide

Add the page to the guide's toctree and page list, and broaden the intro so
the Store is framed as backing multiple orchestrators (SGLang/RBG and llm-d),
not SGLang alone.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds a new documentation page detailing the integration of Mooncake with llm-d on Kubernetes, covering the vLLM connector contract, KV cache offloading, and prefill/decode KV transfer. It also updates the main Kubernetes deployment guide to reference this new page. The review feedback suggests standardizing the MyST Markdown syntax by replacing backtick-based directives with colon-based directives for better rendering on GitHub, and standardizing spelling to US English.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment on lines +40 to +42
```{important}
Set `PYTHONHASHSEED` to the **same fixed value on every instance sharing a Store**. Mooncake keys blocks by a content hash derived from vLLM's block hashes, and Python randomises its hash seed per process by default — leave it unset and two instances compute different keys for identical tokens, so the pool stays healthy while the cross-instance hit rate sits at zero.
```

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Use the colon-based directive syntax (:::{important}) instead of backticks ({important}). In MyST Markdown, colon-based directives are the recommended standard for nesting and block-level elements. Furthermore, GitHub's native Markdown renderer does not recognize backtick-based directives and displays them as raw code blocks, whereas colon-based directives degrade gracefully. This also standardizes the spelling of 'randomises' to 'randomizes' to match the US English spelling used elsewhere in the repository.

Suggested change
```{important}
Set `PYTHONHASHSEED` to the **same fixed value on every instance sharing a Store**. Mooncake keys blocks by a content hash derived from vLLM's block hashes, and Python randomises its hash seed per process by default — leave it unset and two instances compute different keys for identical tokens, so the pool stays healthy while the cross-instance hit rate sits at zero.
```
:::{important}
Set `PYTHONHASHSEED` to the **same fixed value on every instance sharing a Store**. Mooncake keys blocks by a content hash derived from vLLM's block hashes, and Python randomizes its hash seed per process by default — leave it unset and two instances compute different keys for identical tokens, so the pool stays healthy while the cross-instance hit rate sits at zero.
:::

Comment on lines +48 to +53
```{note}
**Upstream sources** (llm-d `v0.8.0`):
- Guide: [Tiered Prefix Cache](https://github.com/llm-d/llm-d/tree/v0.8.0/guides/tiered-prefix-cache) — the deployment walkthrough; the MooncakeStore path has `cpu` and `fs` variants.
- Architecture: [KV Offloader](https://github.com/llm-d/llm-d/blob/v0.8.0/docs/architecture/advanced/kv-management/kv-offloader.md) — Master/Client roles and a `mooncake_config.json` field table.
- Overlays: [`helpers/mooncake-master-store/`](https://github.com/llm-d/llm-d/tree/v0.8.0/helpers/mooncake-master-store) (Master; both variants), [`modelserver/gpu/vllm/mooncake-store/`](https://github.com/llm-d/llm-d/tree/v0.8.0/guides/tiered-prefix-cache/modelserver/gpu/vllm/mooncake-store) (`cpu`/`fs` vLLM overlays), [`helpers/mooncake-client/`](https://github.com/llm-d/llm-d/tree/v0.8.0/helpers/mooncake-client) (Client DaemonSet base; `fs` patches it up).
```

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Use the colon-based directive syntax (:::{note}) instead of backticks ({note}) to ensure consistent rendering on GitHub and adhere to MyST Markdown best practices.

Suggested change
```{note}
**Upstream sources** (llm-d `v0.8.0`):
- Guide: [Tiered Prefix Cache](https://github.com/llm-d/llm-d/tree/v0.8.0/guides/tiered-prefix-cache) — the deployment walkthrough; the MooncakeStore path has `cpu` and `fs` variants.
- Architecture: [KV Offloader](https://github.com/llm-d/llm-d/blob/v0.8.0/docs/architecture/advanced/kv-management/kv-offloader.md) — Master/Client roles and a `mooncake_config.json` field table.
- Overlays: [`helpers/mooncake-master-store/`](https://github.com/llm-d/llm-d/tree/v0.8.0/helpers/mooncake-master-store) (Master; both variants), [`modelserver/gpu/vllm/mooncake-store/`](https://github.com/llm-d/llm-d/tree/v0.8.0/guides/tiered-prefix-cache/modelserver/gpu/vllm/mooncake-store) (`cpu`/`fs` vLLM overlays), [`helpers/mooncake-client/`](https://github.com/llm-d/llm-d/tree/v0.8.0/helpers/mooncake-client) (Client DaemonSet base; `fs` patches it up).
```
:::{note}
**Upstream sources** (llm-d `v0.8.0`):
- Guide: [Tiered Prefix Cache](https://github.com/llm-d/llm-d/tree/v0.8.0/guides/tiered-prefix-cache) — the deployment walkthrough; the MooncakeStore path has `cpu` and `fs` variants.
- Architecture: [KV Offloader](https://github.com/llm-d/llm-d/blob/v0.8.0/docs/architecture/advanced/kv-management/kv-offloader.md) — Master/Client roles and a `mooncake_config.json` field table.
- Overlays: [`helpers/mooncake-master-store/`](https://github.com/llm-d/llm-d/tree/v0.8.0/helpers/mooncake-master-store) (Master; both variants), [`modelserver/gpu/vllm/mooncake-store/`](https://github.com/llm-d/llm-d/tree/v0.8.0/guides/tiered-prefix-cache/modelserver/gpu/vllm/mooncake-store) (`cpu`/`fs` vLLM overlays), [`helpers/mooncake-client/`](https://github.com/llm-d/llm-d/tree/v0.8.0/helpers/mooncake-client) (Client DaemonSet base; `fs` patches it up).
:::

Comment on lines +55 to +57
```{note}
**Confirming Mooncake specifically.** The guide's offload verification inspects the decode Pod's `/mnt/files-storage/kv-cache`, which is the vLLM-native/LMCache filesystem tier — a Mooncake `fs` deployment writes nowhere near it, so an all-`Ready` cluster does not prove the Store is working. Confirm Mooncake on the `mooncake_client` Pod instead: its `/data/mooncake-offload` should grow after a long request, and the Master should show the pool registered (metrics on `:9003`).
```

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Use the colon-based directive syntax (:::{note}) instead of backticks ({note}) to ensure consistent rendering on GitHub and adhere to MyST Markdown best practices.

Suggested change
```{note}
**Confirming Mooncake specifically.** The guide's offload verification inspects the decode Pod's `/mnt/files-storage/kv-cache`, which is the vLLM-native/LMCache filesystem tier — a Mooncake `fs` deployment writes nowhere near it, so an all-`Ready` cluster does not prove the Store is working. Confirm Mooncake on the `mooncake_client` Pod instead: its `/data/mooncake-offload` should grow after a long request, and the Master should show the pool registered (metrics on `:9003`).
```
:::{note}
**Confirming Mooncake specifically.** The guide's offload verification inspects the decode Pod's `/mnt/files-storage/kv-cache`, which is the vLLM-native/LMCache filesystem tier — a Mooncake `fs` deployment writes nowhere near it, so an all-`Ready` cluster does not prove the Store is working. Confirm Mooncake on the `mooncake_client` Pod instead: its `/data/mooncake-offload` should grow after a long request, and the Master should show the pool registered (metrics on `:9003`).
:::

@github-actions github-actions Bot added documentation Improvements or additions to documentation run-ci labels Jul 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation run-ci

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant