Eclipse JKube 1.10 is now available!
On behalf of the Eclipse JKube team and everyone who has contributed, I'm happy to announce that Eclipse JKube 1.10.1
has been released and is now available from Maven Central 🎉.
Thanks to all of you who have contributed with issue reports, pull requests, feedback, and spreading the word with blogs, videos, comments, and so on. We really appreciate your help, keep it up!
What's new?
Without further ado, let's have a look at the most significant updates:
- Introducing Eclipse JKube Remote Development (Preview)
- Automatic Health Check configuration for projects using SmallRye Health
- Improved support for Podman
- Updated base images
- 🐛 Many other bug-fixes and minor improvements
Eclipse JKube Remote Development (Preview)
The new Kubernetes remote development feature provided by Eclipse JKube allows you to run and debug your Java applications from your local machine while connected to your Kubernetes cluster. It's essentially like placing your local development machine inside your cluster. This means that you will be able to:
- Consume services that are only available in your cluster
- Expose your locally running application to the rest of the Pods and services running in your cluster
The following diagram shows the topology of a distributed application as deployed in a Kubernetes cluster:
Considering that Pod A is a Java application you are working on, by starting an Eclipse JKube remote development session, the topology will be updated as in the next diagram:
Users accessing Ingress A and Service A, will now receive traffic from your local machine instead of Pod A. In addition, your local machine will be able to access Service B and Service C since those services will be available at local ports in your system.
To be able to use the new feature, you'll only need to provide a minimal configuration:
<plugin>
<groupId>org.eclipse.jkube</groupId>
<artifactId>kubernetes-maven-plugin</artifactId>
<configuration>
<remoteDevelopment>
<localServices>
<localService>
<serviceName>my-local-service</serviceName>
<port>8080</port>
</localService>
</localServices>
<remoteServices>
<remoteService>
<hostname>postgresql</hostname>
<port>5432</port>
</remoteService>
</remoteServices>
</remoteDevelopment>
</configuration>
</plugin>
For each local port you want to expose in the cluster, you'll need to define a <localService>
with the name of the Kubernetes service and the port. Eclipse JKube will either create a new Kubernetes Service, or temporarily replace an existing Service with that name and forward any traffic directed to the configured port in that Service to your local machine.
For each remote port from your cluster that you want to consume locally, you need to define a <remoteService>
with the name of the Kubernetes service and its port. Eclipse JKube will listen to traffic to that port in your local machine and forward it to the remote service running in the cluster.
Once you've set up the configuration for your application, you can start a remote development session by running the following command:
mvn k8s:remote-dev
You can find a complete example of a distributed application built with Quarkus, Micronaut, and Spring with the necessary JKube project configuration in this GitHub repository.
You can also watch the next YouTube video to see the Eclipse JKube remote dev in action:
Using this release
If your project is based on Maven, you just need to add the Kubernetes Maven plugin or the OpenShift Maven plugin to your plugin dependencies:
<plugin>
<groupId>org.eclipse.jkube</groupId>
<artifactId>kubernetes-maven-plugin</artifactId>
<version>1.10.1</version>
</plugin>
If your project is based on Gradle, you just need to add the Kubernetes Gradle plugin or the OpenShift Gradle plugin to your plugin dependencies:
plugins {
id 'org.eclipse.jkube.kubernetes' version '1.10.1'
}
How can you help?
If you're interested in helping out and are a first-time contributor, check out the "first-timers-only" tag in the issue repository. We've tagged extremely easy issues so that you can get started contributing to Open Source and the Eclipse organization.
If you are a more experienced developer or have already contributed to JKube, check the "help wanted" tag.
We're also excited to read articles and posts mentioning our project and sharing the user experience. Feedback is the only way to improve.
Project Page | GitHub | Issues | Gitter | Mailing list | Stack Overflow