InferNex Bridge

InferNex 接入 KServe 的适配层,支持双 CRD 声明式部署

Docs License Helm KServe


Overview

InferNex Bridge 是 InferNex 接入 KServe 的适配层(Controller + Webhook),根据 LLMInferenceService / InferNexService 声明,自动部署并调和 InferNex 推理套件。

提供两种部署形式:

  • KServe LLMInferenceService + InferNex Bridge:推理 Engine / Hermes 路由由 KServe 部署,增强组件由 InferNex Bridge 部署。
  • InferNex Bridge InferNexService:不经过 KServe,由 InferNex Bridge 统一编排推理 Engine、Hermes 路由及增强组件。

InferNex 主 chart 的一键 Helm 全栈安装为不同入口。

增强组件能力范围与 InferNex 集成部署用户手册 一致。架构与责任边界见 OFEP-0040 InferNex 接入 KServe 适配层提案InferNex Bridge 技术规格说明文档

Quick Start

Prerequisites

  • Kubernetes 集群,kubectl、Helm v3+。
  • 推理集群:NPU Operator、LWS 等,详见 InferNex 用户手册 — 前提条件
  • KServe LLMInferenceService 路径:须安装 KServe(版本 0.17.0–0.19.0,须支持 LLMInferenceService)。
  • InferNex Bridge InferNexService 路径:不依赖 KServe。
  • 网关访问:Envoy Gateway 及 Gateway API、GIE 相关 CRD。

Binary Deployment

以命名空间 infernex-bridge-system、release 名称 infernex-bridge 为例,执行:

helm upgrade --install infernex-bridge oci://cr.openfuyao.cn/charts/infernex-bridge \
  --version 0.0.0-latest \
  -n infernex-bridge-system --create-namespace --wait --timeout 10m

其中 0.0.0-latest 需替换为具体 Chart 版本。

Source Deployment

  1. 从仓库拉取项目。

    git clone https://gitcode.com/openFuyao/InferNex.git
    
  2. 安装 InferNex Bridge。

    以命名空间 infernex-bridge-system、release 名称 infernex-bridge 为例,在 InferNex/component/InferNex-Bridge 目录下执行如下命令:

    cd InferNex/component/InferNex-Bridge
    helm upgrade --install infernex-bridge ./chart/infernex-bridge \
      -n infernex-bridge-system --create-namespace --wait --timeout 10m
    

Verify Deployment

  1. 确认 Controller Pod 与 Service 已就绪。

    kubectl get pods,svc -n infernex-bridge-system
    
  2. 确认 Mutating / Validating Webhook 已注册。

    kubectl get mutatingwebhookconfiguration,validatingwebhookconfiguration | grep infernex-bridge
    
  3. 等待 Webhook 与证书就绪,而后部署 InferNex。

安装参数、卸载及 InferNex 部署详见 InferNex Bridge 用户手册

Deploy InferNex

InferNex Bridge 安装并验证通过后,config/examples/ 下选取示例 YAML,用 kubectl apply 提交即可部署 InferNex

  1. 选择示例文件

    LLMISVC(8 种规格矩阵)

    模式 目录 说明
    Aggregate llmisvc/aggregate/ ag-01-*.yaml .. ag-03-*.yaml
    Disaggregated (PD) llmisvc/disaggregated/ pd-01-*.yaml .. pd-05-*.yaml

    示例含 huggingface-download initContainer,部署时从 Hugging Face Hub 拉取模型(如 ag-01-single-node-single-card.yaml)。

    InferNexService(8 种规格矩阵,engine 模板与 llmisvc 同 Spec ID 对齐)

    模式 目录 说明
    Aggregate insvc/aggregate/ ag-01-*.yaml .. ag-03-*.yaml
    Disaggregated (PD) insvc/disaggregated/ pd-01-*.yaml .. pd-05-*.yaml

    示例含 Mooncake initContainer、huggingface-download 与完整 vllm serve 启动参数(与对应 llmisvc 示例一致);InferNexService.spec.model + baseRefs 指向 InferNexServiceConfig 中的 engine 模板。

    • KServe LLMInferenceService + InferNex Bridge:选 llmisvc/ 下对应 Spec ID YAML(含 infernex.io/runtime: "true")。
    • InferNex Bridge 直管 InferNexService:选 insvc/ 下同 Spec ID YAML。
  2. 提交 YAML

    cd InferNex/component/InferNex-Bridge/config/examples/insvc/aggregate
    kubectl apply -f ag-01-single-node-single-card.yaml -n kserve
    

    将路径与文件名替换为目标场景。