GithubHelp home page GithubHelp logo

kubegpt's Introduction

kubegpt

License: MIT

A command-line tool for using human language to interact with Kubernetes. Powered by OpenAI/GPT.

kubegpt will take your input like

kubegpt "Am I using GlusterFS as a storage class?"

It will generate a kubectl command to run to get information, read the results of the command and then interpret the results. It will use your local kubectl config and context to reach your k8s cluster.

kubectl get storageclass

An example of the output of the above command is:

$ kubegpt "Am I using GlusterFS as a storage class?"

> Entering new AgentExecutor chain...
 I need to use kubectl to query the storage class information.
Action: terminal
Action Input: kubectl get storageclass
Observation: NAME                 PROVISIONER          RECLAIMPOLICY   VOLUMEBINDINGMODE   ALLOWVOLUMEEXPANSION   AGE
hostpath (default)   docker.io/hostpath   Delete          Immediate           false                  14d

Thought: I can see the storage class is "hostpath" which is not GlusterFS.
Final Answer: No, you are not using GlusterFS as a storage class.

> Finished chain.

The data you see in Observation is real info returned from the kubectl command that the AI agent ran using whatever Kubernetes cluster is currently set in your kubectl context.

Installation

pip install kubegpt

Setup your OpenAI API key

export OPENAI_API_KEY=xxxx

# NOTE: you will need to add a credit card to the OpenAI dashboard for this to work.

And then ask away!

kubegpt "What kubernetes context am I using?"

WARNING

Use at your own risk! We tell the OpenAI agent mutliple times to only run non-destructive kubectl commands but this is not guaranteed. We are not responsible for any damage.

kubegpt's People

Contributors

noqcks avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.