Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

基于K8S准入控制机制的微服务资源管控平台,多K8S统一监控、告警、展示最佳实践

License

Notifications You must be signed in to change notification settings

tomlinux/KubeDoor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

282 Commits

Repository files navigation

English | 简体中文

StarsL.cn Commits open issues Python Node.js GitHub license OSCS Status

kubedoor

花折 - KubeDoor

Seize the moment when flowers bloom🌻Don't wait until there are no flowers to pick


For users in China experiencing image loading issues, please visit the Gitee mirror site: https://gitee.com/starsl/KubeDoor

🏷Table of Contents


🌈Overview

🌼花折 - KubeDoor is a microservice resource management platform developed with Python + Vue, based on K8S admission control mechanisms. It supports unified remote storage, monitoring, alerting, and display for multiple K8S clusters. Focusing on the resource perspective of microservices during daily peak periods, it implements resource analysis, statistics, and strong governance for microservices, ensuring consistency between microservice resource request rates and actual usage rates.

💠New Architecture

🎉New K8S Event Monitoring, Pod Real-time Logs, K8S MCP Support! Unified K8S Management, Multi-K8S Monitoring, Alerting, and Display Best Practices🎉

KubeDoor1.5.2

💎Feature Description

0. 💥New Version Highlights

🎥KubeDoor K8S Event Collection, Analysis & Monitoring Alerts! Multi-K8S event collection and query analysis with flexible K8S event alert rule configuration.
🔍Click to expand ... 【K8S Event Alert Rule Configuration Guide】
📜KubeDoor WEB adds Pod real-time log tracking with automatic multi-color marking for various exception levels, supporting keyword search, positioning, and filtering. Supports native log color display.
🔍Click to expand ...
Image
💽K8S Microservice Version Update Feature: Supports designated account and time period authorization operations, plus automatic tag retrieval from image repositories.
🔍Click to expand ... 【K8S Microservice Image Update Configuration Guide】
💠KubeDoor supports management and synchronization of multi-K8S ISTIO VirtualService rules.
🔍Click to expand ...

🚸Internal trial phase, using MySQL data source. Please contact the author for debugging assistance if needed.

1 3
2 4
🧱KubeDoor MCP Preview Version is here! Connect to any MCP client for LLM conversational operations on all your K8S clusters and resource exception troubleshooting.
🔍Click to expand ...
  • Use any MCP client, add MCP server, select SSE type, and enter the address: http://{nodeIP}:{kubedoor-mcp-NodePort}/sse to connect to KubeDoor MCP.

  • Based on KubeDoor's multi-K8S management monitoring architecture and existing API interfaces, we can quickly generate numerous MCP tools for K8S operations and Grafana data analysis. Stay tuned!

  • Connected Tool List & Operation Demo

    Due to the uncertainty of large language models, please try to use MCP clients with tool confirmation (Cline, Cursor).

    This is currently a preview version. MCP web client and tool call authentication are not yet implemented. Please do not expose the MCP server address to the public internet.


1. 📡Microservice Monitoring & Analysis: Multi-K8S Cluster Unified Monitoring Best Practices

  • 🌊Based on the VictoriaMetrics suite, implementing a one-stop K8S monitoring solution for multi-K8S cluster unified remote storage, monitoring, alerting, and display.
  • 🎨Integrated K8S node monitoring dashboard and K8S resource monitoring dashboard, both supporting viewing of various K8S cluster resources in a single dashboard.
  • 📐Built-in alert rules for K8S resources, JVM resources, and K8S nodes, supporting unified alert rule management, integration with various IM alerts, and flexible @ mechanisms.

2. 🎛K8S Resource Maintenance Management: Enhanced Management Features

  • 🎭K8S workload real-time monitoring management page: Real-time viewing of microservice status and Pod log tracking with automatic multi-color marking for various exception levels, supporting keyword filtering.
  • 📀Microservice version updates support designated accounts, specified time periods for authorized operations, and automatic tag retrieval from image repositories. 【K8S Microservice Image Update Configuration Guide】
  • ⏱️Supports immediate, scheduled, and periodic execution of microservice isolation, scaling, and restart operations.
  • ♨Provides extensive one-click JVM performance analysis operation support for JAVA microservices.
  • 🌐Supports management and synchronization of multi-K8S ISTIO VirtualService rules.

3. 🧬Exception Alert Notification & Intelligent Aggregation

  • 🦄K8S microservice unified alert analysis and processing page with daily intelligent aggregation display, processing markers, daily cumulative counting for identical alerts, providing clear daily alert overview.
  • 🕹️Supports operations on PODs including isolation, deletion, Java dump, jstack, jfr, JVM data collection and analysis, with IM notifications.
  • 📺New K8S event collection, analysis & monitoring alerts! Multi-K8S event collection and query analysis with flexible K8S event alert rule configuration. 【K8S Event Alert Rule Configuration Guide】

4. 💠Peak Period P95 Resource Collection & Analysis

📊Collects P95 CPU and memory consumption during daily business peak periods for K8S microservices, along with request values, limit values, and Pod counts. Implements visualization analysis based on collected data.

  • 🎨Daily dimension-based collection of P95 resource data during peak periods, enabling excellent observation of long-term resource changes for various microservices, with smooth performance even when viewing 1 year of data.
  • 🏅Peak period global resource statistics and various resource TOP10, namespace-level peak period P95 resource usage and resource consumption ratio relative to overall resources
  • 🧿Microservice-level peak period overall resource and utilization analysis, microservice and Pod-level resource curve charts (request values, limit values, usage values)

🎡Daily retrieval of resource information for various microservices from the last 10 days of collected data, obtaining P95 resources from the day with maximum resource consumption as microservice request values written to the database.

  • After enabling admission control: Implements microservice automatic request value management mechanism, supporting unified strong governance page for manual adjustment of microservice limit values and Pod counts.
  • Based on admission control mechanism, achieving consistency between actual usage rates and resource request values for K8S microservice resources has very important significance:
    • 🌊K8S scheduler can more precisely schedule Pods to appropriate nodes through real resource request values, avoiding resource fragmentation and achieving node resource balance.
    • K8S auto-scaling also relies on resource request values for judgment, real request values can more accurately trigger scaling operations.
    • 🛡K8S Quality of Service (QoS mechanism) combined with request values, Pods with real request values will be prioritized for retention, ensuring normal operation of critical services.

5. 🚧K8S Admission Control Based: Ensuring Strong Consistency Between Microservice Requirements and Peak Resources


6. ✨Others

  • ❤️Agent management page: Update and maintain Agent status, configure collection and governance.
  • 🔒Based on NGINX basic authentication, supports LDAP, interface-level permission control, and all operation audit logs with notifications.
  • 📊All dashboards are created based on Grafana and integrated into the frontend UI, enabling data analysis to quickly achieve more elegant displays.

📀KubeDoor New Architecture, New Deployment

🔍Click to expand ...
### 【Download helm package】
wget https://StarsL.cn/kubedoor/kubedoor-1.5.2.tgz
tar -zxvf kubedoor-1.5.2.tgz
cd kubedoor
### 【Master installation】
# Edit values-master.yaml file, please read comments carefully and modify configuration content according to descriptions.
# try
helm upgrade -i kubedoor . --namespace kubedoor --create-namespace --values values-master.yaml --dry-run --debug
# install
helm upgrade -i kubedoor . --namespace kubedoor --create-namespace --values values-master.yaml
### 【Agent installation】
# Edit values-agent.yaml file, please read comments carefully and modify configuration content according to descriptions.
helm upgrade -i kubedoor-agent . --namespace kubedoor --create-namespace --values values-agent.yaml --set tsdb.external_labels_value=xxxxxxxx

♻Update Guide 【Version Change Log】

🔍Click to expand ...
# Download installation package
wget https://StarsL.cn/kubedoor/kubedoor-1.5.2.tgz
tar -zxvf kubedoor-1.5.2.tgz
# Updating from older versions to 1.3.0 and above requires adding 2 new database fields
ALTER TABLE kubedoor.k8s_agent_status ADD COLUMN nms_not_confirm Bool DEFAULT false AFTER admission_namespace;
ALTER TABLE kubedoor.k8s_agent_status ADD COLUMN scheduler Bool DEFAULT false AFTER nms_not_confirm;

Note:

  • Please refer to the already deployed configmap: kubedoor-info for VictoriaMetrics, ClickHouse and other configuration items to modify the corresponding configurations in values-master.yaml and values-agent.yaml, ensuring the configurations used are consistent with the old version. (Direct file replacement is not possible due to yaml configuration adjustments.)
  • Or use the following commands to view the values configuration information used during deployment, and modify the corresponding configurations in values-master.yaml and values-agent.yaml.
helm get values kubedoor -n kubedoor
helm get values kubedoor-agent -n kubedoor

【Master update】

helm upgrade -i kubedoor . --namespace kubedoor --create-namespace --values values-master.yaml

【Agent update】

helm upgrade -i kubedoor-agent . --namespace kubedoor --create-namespace --values values-agent.yaml --set tsdb.external_labels_value=xxxxxxxx

🌐Usage Instructions

🔍Click to expand ...
  • Access WebUI and Initialize Data:
    1. Access using K8S node IP + kubedoor-web NodePort, default username and password are both kubedoor
    2. Click Agent Management, first enable Auto Collection, set the Peak Period, then execute collection: input the Historical Data Duration to collect, click Collect to collect historical data and update peak period data to the governance table.
  • Note:
    • After enabling auto collection, data from the previous day's peak period will be collected daily at 1 AM, and data from the day with maximum resource consumption within 10 days will be written to the governance table.
    • Repeatedly executing Collection will not cause duplicate data writes, please use with confidence; after each collection, data from the day with maximum resource consumption within 10 days will automatically be written to the governance table. If it takes a long time, please wait for collection completion or shorten the collection duration.
    • If you have a newly installed monitoring system and the current day's peak period has passed, no data will be collected; you need to wait until after the next day's peak period to collect data.

🔔KubeDoor Community & 🧧Sponsorship

If you think the project is good, please give it a ⭐️Star⭐️ If you have other ideas or requirements, welcome to discuss in issues

kubedoor-wechat

Add author's WeChat or follow the official account to join the discussion group

🙇Contributors

🥰Acknowledgments

Thanks to the following excellent projects, without which KubeDoor would not be possible:

Special Thanks

  • CassTime: The birth of KubeDoor is inseparable from the support of 🦄CassTime.

About

基于K8S准入控制机制的微服务资源管控平台,多K8S统一监控、告警、展示最佳实践

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Vue 36.4%
  • Python 33.7%
  • TypeScript 19.7%
  • Go 5.4%
  • SCSS 2.6%
  • Shell 0.7%
  • Other 1.5%

AltStyle によって変換されたページ (->オリジナル) /