{"id":26608283,"url":"https://github.com/futuretea/kube-node-bundle","last_synced_at":"2025-03-23T23:50:30.168Z","repository":{"id":284005647,"uuid":"953409119","full_name":"futuretea/kube-node-bundle","owner":"futuretea","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-23T15:46:33.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-23T16:35:54.910Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/futuretea.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-23T09:51:52.000Z","updated_at":"2025-03-23T15:46:36.000Z","dependencies_parsed_at":"2025-03-23T16:46:06.582Z","dependency_job_id":null,"html_url":"https://github.com/futuretea/kube-node-bundle","commit_stats":null,"previous_names":["futuretea/kube-node-bundle"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/futuretea%2Fkube-node-bundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/futuretea%2Fkube-node-bundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/futuretea%2Fkube-node-bundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/futuretea%2Fkube-node-bundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/futuretea","download_url":"https://codeload.github.com/futuretea/kube-node-bundle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245186926,"owners_count":20574554,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-23T23:50:29.550Z","updated_at":"2025-03-23T23:50:30.161Z","avatar_url":"https://github.com/futuretea.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Kubernetes Node Bundle\n\n一个用于收集 Kubernetes 节点信息的可扩展工具集。通过插件化设计，支持灵活的数据收集和报告生成。\n\n## 功能特点\n\n- 插件化架构，易于扩展\n- 支持本地和远程命令执行\n- 分类管理的数据收集器\n- 支持自定义脚本\n\n## 项目结构\n\n```\n.\n├── ansible.cfg           # Ansible 配置文件\n├── plugins/            # 插件目录\n│   └── collectors/    # 数据收集插件\n│       ├── system.yml\n│       ├── network.yml\n│       └── kubernetes.yml\n├── lib/               # 核心库\n│   └── plugin_loader.py\n├── scripts/          # 自定义脚本\n├── playbooks/        # Ansible playbooks\n└── output/           # 输出目录\n```\n\n## 前置条件\n\n- Python 3.6+\n- Ansible 2.9+\n- 对目标节点的 SSH 访问权限\n- 本地 kubectl 配置（用于收集 Kubernetes 信息）\n\n## 安装\n\n1. 克隆仓库：\n   ```bash\n   git clone \u003crepository-url\u003e\n   cd kube-node-bundle\n   ```\n\n2. 安装依赖：\n   ```bash\n   pip install -r requirements.txt\n   ```\n\n## 配置\n\n### 添加新的收集器\n1. 在 `plugins/collectors/` 创建新的 YAML 文件\n2. 定义收集器配置：\n   ```yaml\n   name: Your Collector\n   description: Your description\n   enabled: true\n   \n   commands:\n     - name: command_name\n       cmd: your_command\n       category: your_category\n   \n   scripts:\n     - name: script_name\n       path: your_category/script.sh\n       description: Script description\n   ```\n\n### 运行\n\n1. 构建镜像：\n```bash\ndocker build -t kube-node-bundle .\n```\n\n2. 进入容器\n```bash\ndocker run -it --rm \\\n      -v $(pwd):/app \\\n      -v ${HOME}/.kube:/root/.kube:ro \\\n      -v ${HOME}/.ssh:/root/.ssh:ro \\\n      kube-node-bundle\n```\n 3. 运行脚本\n ```bash\nansible-playbook playbooks/collect_node_info.yml\n ```\n\n### 注意事项\n\n1. 确保以下文件/目录存在且有正确权限：\n   - `~/.kube/config`：kubectl 配置文件\n   - `~/.ssh/`：SSH 密钥和配置\n\n2. 如果使用密码认证，需要在运行容器时添加环境变量：\n   ```bash\n   docker run -it --rm \\\n       -v $(pwd):/app \\\n       -v ${HOME}/.kube:/root/.kube:ro \\\n       -v ${HOME}/.ssh:/root/.ssh:ro \\\n       -e ANSIBLE_HOST_KEY_CHECKING=False \\\n       -e ANSIBLE_SSH_PASS=your_password \\\n       kube-node-bundle\n   ```\n\n## 贡献指南\n\n1. Fork 项目\n2. 创建特性分支\n3. 提交更改\n4. 推送到分支\n5. 创建 Pull Request\n\n## 许可证\n\n[License Name] - 查看 LICENSE 文件了解详情","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffuturetea%2Fkube-node-bundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffuturetea%2Fkube-node-bundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffuturetea%2Fkube-node-bundle/lists"}