From k8s-networking
Spiderpool Kubernetes underlay 和 RDMA 网络部署、运维和排错指南。当用户提到 Spiderpool、RDMA、underlay 网络、Macvlan CNI、SR-IOV、InfiniBand、RoCE、HCA、网卡直通、GPU 网络、AI 集群网络、高性能网络、SpiderIPPool、SpiderMultusConfig、rdma shared device plugin、helmwave 部署 spiderpool、DOCA OFED、ConnectX 时使用此 skill。即使用户没有明确说"部署"或"运维",只要涉及 Spiderpool 或 Kubernetes RDMA 网络相关的问题都应该触发此 skill。
How this skill is triggered — by the user, by Claude, or both
Slash command
/k8s-networking:spiderpoolThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Spiderpool 是 Kubernetes underlay 和 RDMA 网络解决方案,增强 Macvlan CNI、ipvlan CNI 和 SR-IOV CNI 功能,适用于裸金属、虚拟机和公有云环境,为存储、中间件、AI 等 I/O 密集和低延时应用提供高性能网络。
evals/evals.jsonreferences/DEPLOYMENT_GUIDE.mdtemplates/ib/helmwave.ymltemplates/ib/tests.yamltemplates/ib/values.ymltemplates/roce-mif/hca.yamltemplates/roce-mif/helmwave.ymltemplates/roce-mif/kustomization.yamltemplates/roce-mif/nfr.yamltemplates/roce-mif/tests.yamltemplates/roce-mif/values.ymltemplates/roce/hca.yamltemplates/roce/helmwave.ymltemplates/roce/tests.yamltemplates/roce/values.ymlSpiderpool 是 Kubernetes underlay 和 RDMA 网络解决方案,增强 Macvlan CNI、ipvlan CNI 和 SR-IOV CNI 功能,适用于裸金属、虚拟机和公有云环境,为存储、中间件、AI 等 I/O 密集和低延时应用提供高性能网络。
向用户确认以下信息来确定部署场景:
| 场景 | 网络类型 | 网卡用途 | 典型硬件 | 适用场景 |
|---|---|---|---|---|
| IB | InfiniBand | 管理/存储用 Ethernet + 计算用 IB | ConnectX-6 (管理) + ConnectX-7 (计算) | 专用 IB 交换机环境,最高性能 |
| RoCE 单网段 | RoCE | Bonding 统一用于管理/存储/计算 | ConnectX-5 (Bonding) | 单网段以太网环境 |
| RoCE 多网段 | RoCE | 多块网卡分属不同网段 | ConnectX-7 (8x 独立网卡) | SuperPod 多交换机环境 |
根据场景收集以下信息:
lspci -nn | grep Mellanox 获取,如 10211017bond0192.168.0.0/16192.168.0.1-192.168.63.254ens1130np0, ens1131np0, ...询问用户:
lspci -nn | grep Mellanox 的输出是什么?根据用户提供的信息,基于 references/DEPLOYMENT_GUIDE.md 中的模板生成定制化配置文件:
IB 场景生成:
helmwave.yml — Helm 部署配置values.yml — RDMA 设备插件配置(填入用户的 deviceID)tests.yaml — RDMA 测试 DaemonSetRoCE 单网段生成:
helmwave.yml — Helm 部署配置values.yml — RDMA 设备插件配置(填入用户的 deviceID)hca.yaml — SpiderIPPool + SpiderMultusConfig(填入用户的 bond 设备名、网段和 IP 范围)tests.yaml — RDMA 测试 DaemonSetRoCE 多网段生成:
helmwave.yml — Helm 部署配置values.yml — RDMA 设备插件配置(填入用户的网卡名称列表)nfr.yaml — NodeFeatureRule(填入用户的 SU 分组和节点名)hca1.yaml ~ hcaN.yaml — 每块网卡的 SpiderIPPool + SpiderMultusConfigkustomization.yaml — Kustomize 聚合配置tests.yaml — RDMA 测试 DaemonSet按顺序指导用户执行:
部署 Spiderpool:
helmwave up --build
应用网络配置(仅 RoCE 场景):
kubectl apply -f hca.yamlkubectl apply -k .验证部署:
kubectl get pods -n spiderpool
kubectl get spiderippool -A
kubectl get spidermultusconfig -n spiderpool
指导用户执行 RDMA 连通性测试:
# 部署测试 Pod
kubectl apply -f tests.yaml
# 等待 Pod 就绪
kubectl get pods -l app=tests-rdma-hca -o wide
# 在 Pod A 上启动 server
kubectl exec -it <pod-a> -- ib_send_bw -d mlx5_0 # IB 场景
kubectl exec -it <pod-a> -- ib_send_bw -x 7 -d mlx5_bond_0 # RoCE 场景
# 在 Pod B 上启动 client
kubectl exec -it <pod-b> -- ib_send_bw -d mlx5_0 <pod-a-ip> # IB
kubectl exec -it <pod-b> -- ib_send_bw -x 7 -d mlx5_bond_0 <pod-a-ip> # RoCE
# 清理测试 Pod
kubectl delete -f tests.yaml
helmwave down
nfr.yaml 添加新���点到正确的 SU 分组修改 helmwave.yml 中的 chart version,然后重新执行 helmwave up --build
| 问题 | 可能原因 | 排查方法 |
|---|---|---|
| Pod 无法分配 RDMA 资源 | RDMA Shared Device Plugin 未正确配置 | kubectl get node <node> -o json | jq '.status.allocatable' 检查 rdma/hca 资源 |
| Pod 网络不通 | SpiderMultusConfig 或 SpiderIPPool 配置错误 | kubectl describe spiderippool <pool> 检查 IP 分配状态 |
| ib_send_bw 测试失败 | DOCA OFED 未安装或版本不匹配 | 节点执行 ofed_info 确认驱动版本 |
| IP 地址耗尽 | IP 池范围太小 | kubectl get spiderippool <pool> -o yaml 检查已分配 IP |
| Pod 无 IPC_LOCK 权限 | SecurityContext 未设置 | 检查 Pod spec 是否包含 capabilities: add: ["IPC_LOCK"] |
| 网卡名不一致(RoCE 多网段) | 不同节点网卡命名不同 | 使用 udev 规则 统一命名 |
| 与 Istio 冲突 | Spiderpool 与 Istio ambient 模式不兼容 | 禁用 Istio ambient 模式 |
# 查看 Spiderpool 组件状态
kubectl get pods -n spiderpool
# 查看 RDMA 资源分配
kubectl get node <node> -o json | jq '.status.allocatable | to_entries[] | select(.key | startswith("rdma"))'
# 查看 IP 池状态
kubectl get spiderippool -A -o wide
# 查看 Multus 配置
kubectl get spidermultusconfig -n spiderpool
# 查看事件
kubectl get events -n spiderpool --sort-by='.lastTimestamp'
# 查看 Spiderpool controller 日志
kubectl logs -n spiderpool -l app.kubernetes.io/component=spiderpool-controller --tail=100
# 查看 Spiderpool agent 日志
kubectl logs -n spiderpool -l app.kubernetes.io/component=spiderpool-agent --tail=100 --selector-all-nodes
# 节点层面检查 RDMA 设备
rdma link show
ibstat
lspci -nn | grep Mellanox
references/DEPLOYMENT_GUIDE.mdGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.
npx claudepluginhub wutz/infra-skills --plugin storage-skills