Skip to content

ez0000001000000/Kube

Repository files navigation

Kube

🔍 DevOps AI Log Analyzer

The "Hello World" of elite DevOps tooling that thinks

Local AI. Local Logs. Local Genius.


Go Report Card License: MIT

🚀 What is Kube?

Kube is a revolutionary DevOps tool that bridges the gap between cryptic container logs and human understanding. It connects to your local Docker or Kubernetes environment, extracts logs from failing containers/pods, and feeds them to a local AI model (Ollama) for crystal-clear explanations.

Why this will blow your mind:

  • 🛡️ Privacy First: All AI processing happens locally - no data leaves your machine
  • 🤖 AI-Powered Insights: Turns "wall of logs" into actionable explanations
  • 🎨 Hacker Dashboard UI: Beautiful terminal interface with real-time status
  • Lightning Fast: Asynchronous processing with live updates
  • 🐳 Multi-Platform: Docker and Kubernetes support out of the box

✨ Features

  • Local AI Integration: Uses Ollama with Llama 3 for explanations
  • Docker Support: Analyze any running container
  • Kubernetes Support: Pod log analysis with namespace support
  • Terminal UI: Bubble Tea-powered animated interface
  • Configurable: CLI flags and config file support
  • Fix Suggestions: AI-generated kubectl/docker commands to resolve issues
  • Streaming Analysis: Watch the AI "think" in real-time

📋 Prerequisites

Before you begin, ensure you have the following installed:

  1. Go (version 1.21 or later) - Download here

  2. Docker - Installation guide

  3. Ollama - Installation guide

    After installing Ollama, pull the Llama 3 model:

    ollama run llama3

🛠️ Installation

Option 1: Go Install (Recommended)

go install github.com/ez0000001000000/Kube@latest

Option 2: Build from Source

git clone https://github.com/ez0000001000000/Kube.git
cd Kube
go mod tidy
go build -o bin/kube .

Option 3: Docker Build

docker build -t kube .
docker run --rm kube --container my-app

Option 4: Kubernetes Deployment

kubectl apply -f k8s/deployment.yaml

Note: Ensure the Kubernetes deployment has access to the Docker daemon for log analysis. Adjust volumes and security context as needed.

🎯 Usage

Basic Docker Analysis

kube --container my-failing-app

Advanced Docker Options

kube \
  --container nginx \
  --tail 100 \
  --model llama3 \
  --verbose

Kubernetes Pod Analysis

kube \
  --k8s \
  --pod my-web-app \
  --namespace production \
  --tail 50

Configuration File

Create a config.yaml:

ollama:
  model: llama3
  host: http://localhost:11434
docker:
  tail: 20
k8s:
  namespace: default

Then run:

kube --config config.yaml --container my-app

📖 Command Line Options

Flag Description Default
--container Docker container name -
--pod Kubernetes pod name -
--namespace Kubernetes namespace default
--k8s Use Kubernetes instead of Docker false
--tail Number of log lines to fetch 20
--model Ollama model to use llama3
--config Path to config file -
--verbose Enable verbose output false
--help Show help message -

🎨 The Experience

When you run Kube, you'll see:

  1. Connection Phase: "🔗 Connecting to Docker..."
  2. Log Extraction: "📄 Fetching last 20 lines..."
  3. AI Analysis: "🤖 Analyzing with Llama 3..."
  4. Results: Clear explanation + fix suggestions

The terminal transforms into a high-end hacker dashboard with animated status updates!

🧪 Testing

Run the test suite:

go test ./...

🤝 Contributing

We love contributions! Here's how to get started:

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Make your changes and ensure tests pass
  4. Format your code: make fmt
  5. Commit your changes: git commit -m 'Add amazing feature'
  6. Push to the branch: git push origin feature/amazing-feature
  7. Open a Pull Request

📜 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgments

📞 Support


Built with ❤️ for the DevOps community

⭐ Star this repo if it helps you debug faster!

About

DevOps for Docker/Kubernetes

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors