wildone / Kubectl-GPT

Kubernetes cli (kubectl) powered by GPT

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Kubectl-GPT: Kubenetes cli powered by GPT | Quick Hack

Kubectl-GPT is an experimental open-source tool designed for running kubectl commands using GPT. The tool is powered by GPT3.5 and Langchain

Searching for the exact kubectl command can be challenging, so this is a convenient way to find it.

3.mp4

📋 Requirements

⚠️ OpenAI API Keys Configuration ⚠️

Obtain your OpenAI API key from: https://platform.openai.com/account/api-keys.

To use OpenAI API key for Auto-GPT, you NEED to have billing set up (AKA paid account).

You can set up paid account at https://platform.openai.com/account/billing/overview.

For OpenAI API key to work, set up paid account at OpenAI API > Billing

PLEASE ENSURE YOU HAVE DONE THIS STEP BEFORE PROCEEDING, OTHERWISE NOTHING WILL WORK!

💾 Installation

To try Kubectl-GPT, follow these steps:

  1. Make sure you have all the requirements listed above, if not, install/get them

  2. Clone the repository:

        git clone https://github.com/abhishek-ch/Kubectl-GPT.git
  3. Navigate to the directory where the repository was downloaded

    cd Kubectl-GPT
  4. Install the required dependencies

    pip install -r requirements.txt
  5. Configure OpenAI Key

    • If Using OpenAI key, simply export OPENAI_API_KEY=*****
    • If want to use config file, rename config_template.ini -> config.ini file inside the Kubectl-GPT dir & update either Azure or OpenAI config

    By completing these steps, you have properly configured the API Keys for your project.

🔧 Usage

Run Kubectl-GPT Python module in your terminal

python -m kgpt "list all pods"
python -m kgpt "what is the cpu usage of the pod testing in the namespace xyz"

About

Kubernetes cli (kubectl) powered by GPT


Languages

Language:HTML 97.2%Language:Python 2.8%