What’s new in Eclipse JKube v1.12.0 ?

Introduction:

Rohan Kumar
3 min readApr 3, 2023

Eclipse JKube is a popular open-source tool that simplifies the process of building and deploying java applications on Kubernetes. Eclipse JKube provides a seamless integration with the Kubernetes ecosystem and enables developers to deploy their Java applications quickly and easily.

Recently, the Eclipse JKube community released version 1.12.0 with several new features and improvements. In this blog post, we will explore some of the key changes in Eclipse JKube 1.12.0 and how they can benefit developers.

Using the Latest version:

You can start using the latest version v1.12.0 by upgrading your pom.xml or build.gradle files to use latest Kubernetes Maven or Gradle plugins. Something like this:

Maven:

            <plugin>
<groupId>org.eclipse.jkube</groupId>
<artifactId>kubernetes-maven-plugin</artifactId>
<version>1.12.0</version>
</plugin>

<plugin>
<groupId>org.eclipse.jkube</groupId>
<artifactId>openshift-maven-plugin</artifactId>
<version>1.12.0</version>
</plugin>

Gradle:

plugins {
id 'org.eclipse.jkube.openshift' version '1.12.0'
id 'org.eclipse.jkube.kubernetes' version '1.12.0'
}

Support for Kubernetes 1.26.0:

In this release, we upgraded Fabric8 Kubernetes Java Client to v6.5.1 which contains support for Kubernetes 1.26.0. Eclipse JKube uses Fabric8 Kubernetes Java Client for all of it’s interactions with Kubernetes API server. This means Eclipse JKube should be compatible with Kubernetes 1.26.0 release as well.

Support for specifying Controller requests/limits:

According to Kubernetes Patterns book, it’s very important to specify Pod’s memory and cpu requirements and maximum limits. In this release, we’ve provided XML/Groovy DSL configuration option so that user can specify his cpu/memory requests and limits like this:

            <plugin>
<groupId>org.eclipse.jkube</groupId>
<artifactId>kubernetes-maven-plugin</artifactId>
<version>${jkube.version}</version>
<configuration>
<resources>
<controller>
<containerResources>
<requests>
<memory>32Mi</memory>
<cpu>300m</cpu>
</requests>
<limits>
<memory>64Mi</memory>
<cpu>500m</cpu>
</limits>
</containerResources>
</controller>
</resources>
</configuration>
</plugin>

Support for generating Kubernetes CronJob:

Just like generating Kubernetes Controller resources like Deployment, ReplicaSet, Job, StatefulSet. It’s also now possible to configure JKube to generate controllers of type CronJob. You’d need to specify the schedule either using properties or using enricher configuration like this:

            <plugin>
<groupId>org.eclipse.jkube</groupId>
<artifactId>kubernetes-maven-plugin</artifactId>
<version>${jkube.version}</version>
<configuration>
<enricher>
<config>
<jkube-controller>
<type>CronJob</type>
<schedule>0 9 * * 1</schedule>
</jkube-controller>
</config>
</enricher>
</configuration>
</plugin>

Change in JKube annotations’ prefix:

Earlier in previous releases, manifests generated with k8s:resource or k8sResource goal/task used to have opinionated annotations with prefix jkube.io/ . We have changed it to jkube.eclipse.org/ now.

$ gradle k8sResource

$ cat build/classes/java/main/META-INF/jkube/kubernetes/test-project-gradle-service.yml
---
apiVersion: v1
kind: Service
metadata:
annotations:
jkube.eclipse.org/git-commit: 4fb2ba4135f1c0908577db5ea85efc59616fb9d0
jkube.eclipse.org/git-url: git@github.com:foo/eclipse-jkube-demo-project-gradle.git
jkube.eclipse.org/git-branch: main
...

If you’re dependent on jkube.io/ prefix annotations. You can revert to old behavior by setting useLegacyJKubePrefix to true in resources configuration.

Remote Development Improvements:

We got some good feedback from users of recently added Kubernetes Remote Development functionality. We have provided some bug fixes to improve this.

If you are hearing about k8s:remote-dev / k8sRemoteDev functionality for the first time, you can watch a quick demo here.

Conclusion:

Eclipse JKube 1.12.0 is a significant release that brings several new features and improvements to the popular Java Kubernetes deployment tool. With improved support for Kubernetes Remote Development, the Kubernetes CronJob, Resource, Kubernetes operators, and simplified configuration for Kubernetes resources, JKube 1.12.0 makes it easier than ever for developers to deploy Java applications on Kubernetes.

If you haven’t already, give JKube 1.12.0 a try and see how it can simplify your Java application deployments on Kubernetes.

Do you have something in mind which can help us improve this project? We value your feedback a lot so please report bugs, ask for improvements…don’t be shy and join our welcoming community:

--

--

No responses yet