kom

weibaohui
113
[This is a Chinese README. English translation is not available yet.] kom 是一个用于 Kubernetes 操作的工具,SDK级的kubectl、client-go的使用封装。并且支持作为管理k8s 的 MCP server。 它提供了一系列功能来管理 Kubernetes 资源,包括创建、更新、删除和获取资源,甚至使用SQL查询k8s资源。这个项目支持多种 Kubernetes 资源类型的操作,并能够处理自定义资源定义(CRD)。 通过使用 kom,你可以轻松地进行资源的增删改查和日志获取以及操作POD内文件等动作。
#client-go #crd #k8s #kom #sdk #kubectl #sql #cluster #mcp

Overview

What is kom

kom is a tool for Kubernetes operations, serving as a wrapper for SDK-level kubectl and client-go. It functions as a management MCP server for Kubernetes, providing a range of functionalities to manage Kubernetes resources, including creating, updating, deleting, and retrieving resources, as well as querying Kubernetes resources using SQL.

How to Use

To use kom, you need to import it into your Go project and register your Kubernetes clusters. You can then utilize its features for resource management, including CRUD operations and file manipulations within pods. The tool also supports multiple modes for managing clusters and allows for easy integration into your applications.

Key Features

1. User-friendly: Offers comprehensive functionalities for managing both built-in and CRD resources. 2. Multi-cluster support: Easily manage multiple Kubernetes clusters. 3. MCP support: Facilitates multi-cluster MCP management with built-in tools. 4. Cross-namespace operations: Query resources across different namespaces. 5. Chained calls: Simplifies resource operations. 6. CRD support: Easily define and manage custom resources. 7. Callback mechanism: Allows for business logic extension without tight coupling to Kubernetes operations. 8. Pod file operations: Upload, download, and delete files within pods. 9. High-frequency operation encapsulation: Supports various operations like deployment restart and scaling. 10. SQL querying: Allows SQL-like queries for Kubernetes resources. 11. Query caching: Improves performance in high-frequency and bulk query scenarios.

Where to Use

kom is applicable in cloud-native environments where Kubernetes is used for orchestration. It is suitable for DevOps teams, cloud service providers, and organizations managing multiple Kubernetes clusters.

Use Cases

1. Managing multiple Kubernetes clusters efficiently. 2. Performing complex resource queries using SQL. 3. Automating Kubernetes resource management tasks. 4. Integrating Kubernetes operations into custom applications.

Content