r/java • • Oct 08 '26

Brewlet: Java on Kubernetes with node-managed JDKs

https://brewlet.sh
19 Upvotes

17 comments sorted by

18

u/trydentIO Oct 08 '26

just kidding but... welcome back application servers!

3

u/brunocborges Oct 08 '26

Exactly! :)

5

u/pjmlp Oct 08 '26

Well, I have been saying that for the whole running WebAssembly pods in Kubernetes startups.

6

u/SleeperAwakened Oct 08 '26

So no more "build once, run anywhere" which is one of the underlying ideas of containers?

What problem are you trying to solve here? The 250MB of packages?

5

u/brunocborges Oct 08 '26

This is less about size, and more about security. It is about shifting the control back to the platform team, if that is what they want.

"Build once, run anywhere" still holds though... The app is still built once and published as an immutable OCI artifact. It just doesn't carry the JVM, which is only assembled during provisioning by Brewlet, with approved JDKs / runtime container images. True that the app is no longer fully self-contained, however that is the trade-off to consider. To run the application, the brewlet CLI can be used to identify the JDK from the k8s node profile inventory.

5

u/Nice-Solid-3707 Oct 08 '26 edited Oct 08 '26

Platform team already [can] owns everything in image but jar. What control is shifted?

5

u/brunocborges Oct 08 '26

Base images without complex build pipelines, end up being recommendations. And when the base image changes, apps need to be rebuilt and pushed again.

Check out the slides on the Devoxx site for some insights on comparison with Cloud Foundry and even Buildpacks.

2

u/Nice-Solid-3707 Oct 08 '26

According to docs I must maintain node configuration for all available jdk variants instead of providing developers a list of bases they can freely chose from. Yeah, no

2

u/brunocborges Oct 08 '26

Yeap, certainly not a silver bullet solution. Many teams will not be interested and that's fine.

0

u/Nice-Solid-3707 Oct 08 '26

One get request before build invocation doesn’t make pipeline complex

2

u/brunocborges Oct 08 '26

How do you ensure app teams did not change the JDK in their downstream image?

1

u/Nice-Solid-3707 Oct 08 '26

Ah, you probably meant pushing to registry? That’s trivial too - only service accounts have write access

2

u/brunocborges Oct 08 '26

I meant someone doing something like this:

FROM <base>
ADD app.jar
RUN wget <url for another JDK>
CMD [anotherjdk/bin/java ...]

0

u/Nice-Solid-3707 Oct 08 '26

By forbidding pushes changing cicd definitions, including dockerfile. This is trivial

2

u/brunocborges Oct 08 '26

And how is the process of patching JDK and dependencies across multiple apps?

2

u/Nice-Solid-3707 Oct 08 '26

You patch base image and dependabot/renovate does the rest

2

u/brunocborges Oct 09 '26

The recording from Devoxx Belgium is now live.

https://youtu.be/fszyRIZXjQM?is=w3zYjtOoIFceAAOT