Inspiration

This project is clearly inspired by kubectl-ai application which is created by the Google Cloud Platform team. It clearly joines a very tried, tested open source software like Kubernetes and using it with bleeding-edge, industry leading software like GenAI with Gemini.

It was my goal to combine these two approaches.

What it does

It is a cluster assistant. Imagine if there was a person who knew the cluster in-and-out including what logs are happening in a pod, what status a pod is at and more. On top of all this, this assistant can be ordered to do things in the cluster, such as scale deployments to a certain number of replicas.

How I built it

This was built using multiple tools and frameworks.

Firstly Gemini 2.5 Flash was used as the model creating commands out of natural language, by converting a prompt to a JSON format.

Next I used the Kubernetes Python Client to act on something based on the prompt. Such as scale deployment, fetch logs etc. ALL FROM JUST A PROMPT!

Finally all the outputs and displays was created using streamlit.

Challenges I ran into

Time constraint. Given that I was short on time, I had to speed-create and code a decent application and idea. On top of this I also was the only programmer in the hackathon which meant I had to code the frontend too.

Accomplishments that I'm proud of

  • Created something that combines GenAI and Kubernetes
  • Learned the Kubernetes API and the Pythone (and Go) client libraries for it.
  • Successfully created a working streamlit app that does this.

What I learned

  • How to get a proper output from AI models (such as JSON in my case) with perfect prompt engineering.
  • How to use GKE and cloud services to my advantage.
  • The k8s API and all the client libraries for it.

What's next for Cluster Assistant for Kubernetes

Make it work end-to-end.

  • Enable users to connect their own clusters by pasting their Kubeconfig file.
  • Make a login system and more by incorporating a database.
  • Create more functionality that can be translated from a prompt.

Built With

Share this project:

Updates