agentsclimarketplace

K8s network

Skill kweaver-ai/kweaver-dip/skills/create-bkn/references/examples/k8s-network

KWeaver DIP is an enterprise-level digital employee platform, built on KWeaver Core. It provides an AI-native environment for developing and managing digital employees on business knowledge networks—for enterprise intelligence that is understandable, executable, and governable.

Install
npx -y skills add kweaver-ai/kweaver-dip --skill k8s-network

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

SKILL.md

2.8 KB, as published. Nobody here has run it

Kubernetes 模块化网络 - Agent 使用指南

网络ID: k8s-modular
版本: 1.0.0
标签: Kubernetes, 拓扑架构, 运维

网络概览

本知识网络描述 Kubernetes 集群的核心资源拓扑结构,采用模块化组织方式,每个定义独立成文件。

核心对象

对象文件路径说明
Podobject_types/pod.bkn最小部署单元,包含容器规格
Nodeobject_types/node.bkn集群工作节点
Serviceobject_types/service.bkn服务暴露与负载均衡

核心关系

关系文件路径源 → 目标说明
pod_belongs_noderelation_types/pod_belongs_node.bknPod → NodePod 归属节点关系
service_routes_podrelation_types/service_routes_pod.bknService → Pod服务路由到 Pod

可用行动

行动文件路径绑定对象说明
restart_podaction_types/restart_pod.bknPod重启指定 Pod
cordon_nodeaction_types/cordon_node.bknNode隔离节点,禁止调度

拓扑结构

┌─────────────┐     routes      ┌─────────┐
│  Service    │ ───────────────→│   Pod   │
└─────────────┘                 └────┬────┘
                                     │ belongs
                                     ↓
                                ┌─────────┐
                                │  Node   │
                                └─────────┘

使用建议

查询场景

  1. 获取所有 Pod 及其所在节点

    • 读取 object_types/pod.bknobject_types/node.bkn
    • 通过 pod_belongs_node 关系关联
  2. 查找 Service 后端 Pod

    • 读取 object_types/service.bkn
    • 通过 service_routes_pod 关系查询目标 Pod

运维场景

  1. Pod 故障重启

    • 使用 restart_pod 行动
    • 前置检查:确认 Pod 存在且非关键系统 Pod
  2. 节点维护

    • 使用 cordon_node 行动隔离节点
    • 驱逐该节点上的 Pod(如有需要)

索引表

按类型索引

  • 对象定义: object_types/*.bkn
  • 关系定义: relation_types/*.bkn
  • 行动定义: action_types/*.bkn

按功能索引

  • 资源管理: Pod, Node, Service
  • 网络路由: service_routes_pod
  • 调度归属: pod_belongs_node
  • 运维操作: restart_pod, cordon_node

注意事项

  1. 所有定义文件采用模块化组织,便于独立维护
  2. 关系定义中明确指定端点类型和数量约束
  3. 行动定义包含前置条件检查,确保操作安全

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.