Kubert AI Assistant Lite is an open-source project designed to deploy a lightweight version of Kubert Assistant in a local kind (Kubernetes in Docker) cluster. This version includes a single AI agent, the Kubectl Agent, which can execute kubectl
commands within the cluster.
Additional documentation can be found here -> Documentation
Setup video -> Video
Kubert Assistant is a DevOps productivity tool designed to simplify the management of workloads within a Kubernetes cluster. It provides a suite of capabilities that allow DevOps teams to automate, monitor, and manage their Kubernetes environments more efficiently.
Kubert AI Assistant Lite provides an easy way to set up a local Kubernetes environment using kind and deploys a minimal version of the Kubert Assistant platform. This project is ideal for testing and development purposes, offering the core functionalities of Kubert Assistant with a focus on the Kubectl Agent.
- Deploys a local kind cluster.
- Includes a Kubectl Agent for executing
kubectl
commands. - Utilizes Helm charts for easy deployment and management.
- Lightweight and easy to set up for local testing and development.
Before you begin, ensure you have the following installed on your system:
- Docker
- kind
- Helm
- Kubectl
- jq
- Make
- OpenAI API Key or Anthropic API Key (for AI capabilities)
-
Clone the Repository
git clone https://github.com/TranslucentComputing/kubert-assistant-lite.git cd kubert-assistant-lite
-
For testing initialize BATS submodules
git submodule update --init --recursive
The deployment process is automated using a Makefile. To deploy the kind cluster and the Kubert AI Assistant Lite application, run:
make deploy
This will execute the deploy.sh script which sets up the kind cluster and deploys the application using Helm.
deploy.sh
: Deploys the kind cluster and the Kubert AI Assistant Lite application.utils.sh
: Contains utility functions used across the scripts.hello.sh
: Greetings and deployment description.validate-tools.sh
: Validates the installation of required tools.variables.sh
: Contains variables used in the deployment script.cleanup.sh
: Cleans up resources after deployment by deleting the kind cluster and updating the hosts file.
Configuration files are located in the manifests/kubert-assistant/ directory. You can customize the deployment by modifying these Helm values files:
gateway-values.yaml
agent-repo-values.yaml
command-runner-values.yaml
lobe-chat-values.yaml
plugin-repo-values.yaml
help
: Displays available commands.build-kcov-image
: Builds the Docker image for kcov used for test coverage.tests
: Runs unit tests.integration-tests
: Runs integration tests.coverage
: Runs tests with kcov for coverage.clean-build
: Cleans up the coverage directory and Docker image.deploy
: Deploys the kind cluster and Kubert AI Assistant Lite application.deploy-kubert-assistant
: Deploys Kubert Assistant components using Helm.cleanup-kubert-assistant
: Uninstall deployed Kubert Assistant components with Helmcleanup
: Cleans up the kind cluster and hosts file.check-deps-dev
: Checks for required dev dependencies.check-deps-deploy
: Checks for required deployment dependencies.lint-chart
: Lints the Helm chart.template-chart
: Templates the Helm chart.helm-test
: Execute Helm tests
BATS is a testing framework for Bash scripts that provides a simple way to test and validate shell scripts. It is used in this project to ensure the reliability and correctness of shell scripts and command-line operations. BATS tests are written in a plain text format, making them easy to read and understand.
To run the BATS unit tests:
make tests
To run the BATS integration tests:
make integration-tests
To run specific integration test:
make integration-tests INTEGRATION_TEST_FILE=tests/integration/test_deploy_application.bats
To run the tests with kcov for coverage, follow these steps:
-
Build the kcov Docker image:
make build-kcov-image
-
Run the coverage target:
make coverage
This will execute the tests and generate coverage reports in coverage folder using kcov.
We welcome contributions from the community! To contribute, please follow these steps:
- Fork the repository.
- Create a new branch: git checkout -b feature/YourFeatureName.
- Make your changes and commit them: git commit -m 'Add some feature'.
- Push to the branch: git push origin feature/YourFeatureName.
- Open a pull request.
This project is licensed under the terms of the LICENSE
file.
Thank you to all contributors and the open-source community for making this project possible. Special thanks to the authors of the tools and libraries used in this project.