Robusta
ChatGPT Kubernetes YAML Plugin byA ChatGPT plugin to generate accurate Kubernetes manifests
This plugin gives ChatGPT up-to-date knowledge of every Kubernetes resource and their complete specifications. It lets ChatGPT query the Kubernetes OpenAPI (swagger) schema to fetch resource definitions. Additionally, it provides ChatGPT with schema validation capabilities.
Key Features
-
Schema Lookup: The
GET /schemas/search/{resourceName}
endpoint retrieves fully-namespaced names for Kubernetes resources. For instance, a search for 'Container' will yield 'io.k8s.api.core.v1.Container'. -
Schema Retrieval: The
GET /schemas/resource/{resourceType}
endpoint fetches the latest OpenAPI schemas for Kubernetes resources using fully-namespaced resource names. -
YAML Validation: The
POST /validate-yaml
endpoint validates generated Kubernetes YAML manifests, guaranteeing their accuracy.
Setup
To install the required packages for this plugin, run the following command:
pip install -r requirements.txt
To run the plugin, enter the following command:
python main.py
Once the local server is running:
- Navigate to https://chat.openai.com.
- In the Model drop down, select "Plugins" (note, if you don't see it there, you don't have access yet).
- Select "Plugin store"
- Select "Develop your own plugin" (ChatGPT Plus is required right now)
- Enter in
localhost:5003
since this is the URL the server is running on locally, then select "Find manifest file".
The plugin should now be installed and enabled! Watch the video above for ideas on using the plugin.
Getting help
Join the Robusta Slack Community and ask for help.