Skip to main content

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.

Metadata

Release files for kubegpt 0.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kubegpt 0.0.7
File Size Uploaded
kubegpt-0.0.7.tar.gz 4.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for kubegpt 0.0.7
File Interpreter ABI Platform
kubegpt-0.0.7-py3-none-any.whl Python 3 none any Details

Total release size: 9.3 kB

Release files / kubegpt-0.0.7.tar.gz

Download URL kubegpt-0.0.7.tar.gz
Size 4.3 kB
Tags Source
SHA-256 checksum
How to use checksums
a40be20463e7fec982e895cdacc32c2870c7ad89a826ac0b7428f32425ba2fa6
BLAKE2b-256 checksum
How to use checksums
a3cdbc42366fc06920257e0b15f0a6deadc663991cd7578012abc9ff88296c1e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.10

Release files / kubegpt-0.0.7-py3-none-any.whl

Download URL kubegpt-0.0.7-py3-none-any.whl
Size 5.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b9459a6cb14c43781b38f44b5b5f6a543fae3cb96ebf07f7e6abe97573b8f863
BLAKE2b-256 checksum
How to use checksums
556d7be147a6f9209bd5151e6a92635ee727faf8f3199e787796e628c238cd33
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.10

Release history Release notifications | RSS feed

This release

0.0.7 This release

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page