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.

Sentry mobile image

Mobile Vitals: A first step to Faster Apps

Slow startup times, UI hangs, and frozen frames frustrate users—but they’re also fixable. Mobile Vitals help you measure and understand these performance issues so you can optimize your app’s speed and responsiveness. Learn how to use them to reduce friction and improve user experience.

Read the guide

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay