Kamis, 08 Mei 2025

๐Ÿง KubeGPT – AI-Powered Kubernetes Companion

| Kamis, 08 Mei 2025

This is a submission for the Amazon Q Developer "Quack The Code" Challenge: Crushing the Command Line

๐Ÿ’ก What I Built

KubeGPT is an AI-powered CLI tool that serves as your Kubernetes command-line sidekick. It lets you:

  • Troubleshoot cluster issues using natural language
  • ๐ŸŽฎ Play Kubernetes trivia games
  • ๐Ÿ“Š Generate reports for any namespace or object in your cluster
  • ๐Ÿค– Seamlessly integrate Amazon Q Developer for intelligent command assistance

Whether you're debugging a failing pod or just brushing up on your K8s skills with a quick game, kubegpt makes navigating Kubernetes clusters easier, faster, and a bit more fun.

๐ŸŽฅ Demo

๐Ÿ“บ Click here to watch the demo

๐Ÿ“ Code Repository

๐Ÿ”— GitHub – kubegpt

๐Ÿค– How I Used Amazon Q Developer

Amazon Q Developer was central to building KubeGPT:

  • ๐Ÿง  I used Amazon Q to generate Go functions that interact with Kubernetes clusters, including how to fetch and parse pod, deployment, and namespace data.
  • ๐Ÿงช It helped me test ideas rapidly, like how to fetch logs or status events from pods based on natural language prompts.
  • ๐Ÿ”„ While iterating, I constantly used Q to reword or optimize troubleshooting flows and surface useful cluster information.
  • ๐ŸŽฎ Amazon Q even helped brainstorm fun trivia questions for the mini game inside the CLI.
  • ๐Ÿ“š I also used it to learn about kubectl diagnostic flags, Kubernetes client-go usage, and structuring CLI UX with user-friendly prompts.

๐Ÿ’ก Tip: Integrate Amazon Q into your terminal flow to ask coding, infra, or K8s-related questions while building — it's like having a DevOps co-pilot!

⚙️ How to Run It

To run KubeGPT locally, follow these steps:

✅ Prerequisites

Make sure the following tools are installed:

  • kubectl – To communicate with your Kubernetes cluster
  • Go – To compile the project (go1.18+ recommended)
  • Amazon Q Developer CLI (optional, for enhanced AI support)

๐Ÿ“ฆ Setup

Clone the repository and navigate into the directory:

git clone https://github.com/Junnygram/kubegpt.git
cd kubegpt

๐Ÿ“ฅ Install Dependencies

If you're not using an IDE like GoLand, run this command to install project dependencies:

go mod tidy

This ensures all required Go packages from go.mod are downloaded.

๐Ÿ”จ Build the CLI Tool

go build -o kubegpt

This compiles the source code into a binary named kubegpt.

๐Ÿš€ Run the Tool

./kubegpt

You're now ready to experience Kubernetes command-line automation like never before.


Related Posts

Tidak ada komentar:

Posting Komentar