DEV Community

Jeansen
Jeansen

Posted on

Kubernetes Admission Controller written in Kotlin with Quarkus (demo)

Normally, most of additional logic in Kubernetes is written in GO. But since I am a big fan of Kotlin, I wanted to do something in Kotlin. In addition - with respect to my professional work - it should also be written with Quarkus. After all, everything in Kuberntes is REST. And frameworks like Qurakus or Spring make it fairly easy to write REST services.

So, I thought writing a simple admission controller would be a great challenge. During my research, I came across an older project, already 5 years old and written in GO. Anyway, it demonstrated quite well how to write a simple admission controller in GO.

TLDR; I created a simple Quarkus/Kotlin project and finally got a working admission controller. If you are curious, check out my repository. The README will explain how to configure, build and deploy the project.

But be warned. This is some advanced topic! You should feel comfortable with the Kubernetes API and have a Kubernetes cluster and an image registry (e.g. Harbor) at hand.

I hope my project will help you understand Kubernetes and how to program against it. This project is as fresh as this post. Ist a first draft. And I though it is worth sharing. As you know: Release early, release often ;-)

I will continue to work on it. For instance, my next task will be to make it run as a Quarkus Native service.

Top comments (0)