Observed since 20 Oct, 22:30 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
k8s agent that does all the work for you.
KGPT, or Kubernetes General Purpose Tasker, is a cutting-edge Kubernetes agent designed to simplify and streamline the management of complex and manual tasks within your Kubernetes cluster. In the dynamic world of container orchestration and cloud-native computing, KGPT emerges as a powerful ally, offering automation and intelligence to help you efficiently handle a wide range of tasks, from deployment and scaling to monitoring and troubleshooting. This innovative agent is engineered to alleviate the burden of manual interventions, enhancing the agility and reliability of your Kubernetes infrastructure. With KGPT at your side, you can confidently navigate the intricate landscape of Kubernetes, ensuring optimal performance and resource utilization while freeing up valuable time for more strategic endeavors.
pip install agentk8s
$ kgpt --install-completion
kgpt setup
kgpt chat "create an deployment called mynginx, image name is nginx, three replicas, expose port 80"
After a few seconds you should see the following output if everything is executed successfully.
user_proxy (to assistant):
exitcode: 0 (execution succeeded)
Code output:
deployment.apps/mynginx created
service/mynginx exposed
kgpt chat "Change mynginx service's target port to 8001"
If everything is executed successfully, you should see the following output
exitcode: 0 (execution succeeded)
Code output:
service/mynginx patched
kgpt chat "delete mynginx deployment and service"
You should be able to see the following output, if everything is executed successfully.
user_proxy (to assistant):
exitcode: 0 (execution succeeded)
Code output:
deployment.apps "mynginx" deleted
service "mynginx" deleted
kgpt chat "find vulnerability in this k8s yaml file" --doc example_file/deployment1.yaml
you should be seeing the following output
Intent: Code generation task (to find vulnerability in the provided k8s yaml file).
The provided YAML file has a few issues that could potentially be considered vulnerabilities or misconfigurations:
1. The `image` field does not specify a tag. Using the `latest` tag or not specifying a tag can lead to unpredictable deployments because it's not clear which version of the image is being used. It's better to use a specific version for reproducibility and to avoid accidentally pulling in an updated version with potential vulnerabilities.
2. There are no resource requests or limits specified for the container. This can lead to resource exhaustion on the node where the pod is running, potentially affecting other pods and the stability of the node itself.
3. There is no readiness probe defined. While not necessarily a vulnerability, a readiness probe is important for ensuring that traffic is not sent to a container that isn't ready to handle it.
4. The deployment does not define any security context. Without a security context, the container may run with default settings, which could include running as root, potentially leading to security risks if the container is compromised.
5. The YAML syntax is incorrect. The dashes before `name` and `containerPort` should not be indented.
Please note that the specific values for image version, resource requests, limits, and security context should be adjusted according to the actual requirements and best practices for the application and the organization's security policies.
You can also supply kgpt with multiply docs
kgpt chat "combine these to yaml into one yaml" --doc example_file/deployment1.yaml --doc example_file/service1.yaml
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.1.12 | 5 Jan 2024 | 4 |
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 22:30 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:ad9d2b21910d873c949d09e085c37b9e94dacb5444c3149b88c0529a07c03c93