k8sgpt  by k8sgpt-ai

CLI tool for Kubernetes cluster analysis via AI

Created 2 years ago
6,962 stars

Top 7.4% on SourcePulse

GitHubView on GitHub
Project Summary

k8sgpt is a command-line tool designed to simplify Kubernetes cluster diagnostics and issue triaging for SREs and developers. It leverages AI, integrating with various LLM providers, to analyze cluster states, identify problems, and provide explanations in plain English, enriching findings with codified SRE best practices.

How It Works

k8sgpt scans Kubernetes clusters using a suite of built-in analyzers that inspect various resources like Pods, Deployments, and Services. It then sends the collected data to a configured AI backend (e.g., OpenAI, Azure OpenAI, local models) for analysis. The AI provides plain-language explanations and potential solutions, with options for anonymizing sensitive data before transmission.

Quick Start & Requirements

  • Installation: Via package managers (brew, rpm, deb, apk) or direct binary download.
  • Prerequisites: Kubernetes cluster access, LLM API keys (e.g., OpenAI).
  • Setup: Configure AI backend via k8sgpt auth add.
  • Usage: k8sgpt analyze for scans, k8sgpt analyze --explain for AI-powered insights.
  • Documentation: Official Documentation

Highlighted Details

  • Supports multiple LLM backends including OpenAI, Azure, Cohere, Bedrock, Gemini, and local models.
  • Features data anonymization for sensitive information sent to AI backends.
  • Extensible with custom analyzers written in any language.
  • Operator installation available for continuous cluster monitoring.

Maintenance & Community

Licensing & Compatibility

  • License: MIT.
  • Compatible with commercial and closed-source applications.

Limitations & Caveats

  • Anonymization is not yet applied to all analyzers, notably "Events," with masking for event messages scheduled for future implementation.
  • Sensitive fields like "Event Message" are not currently masked.
  • The project recommends using local models in critical production environments due to potential data privacy concerns with public LLMs.
Health Check
Last Commit

2 days ago

Responsiveness

1 week

Pull Requests (30d)
8
Issues (30d)
2
Star History
98 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.