Fabric8 Kubernetes Client 7.4 is now available!
On behalf of the Fabric8
team and everyone who has contributed, I'm happy to announce that the Fabric8 Kubernetes Client 7.4.0
has been
released and is now available from
Maven Central 🎉.
This marks the fourth minor release of the Fabric8 Kubernetes Client 7, bringing new features, bug fixes, and improvements while keeping the breaking changes minimal. If you're coming from version 6, we've prepared a migration guide to help you update your code to this new version.
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:
- Enhanced testing framework with mock client improvements
- Improved informer and watch operation stability
- CRD generation enhancements with annotation support
- Better WebSocket and connection handling
- 🐛 Many other bug fixes and minor improvements
You can find the full changelog for this version in our GitHub release page.
Be sure to check out the migration guide for a smooth upgrade.
Enhanced testing framework with mock client improvements
The testing experience has been significantly enhanced in this release.
The @EnableKubernetesMockClient
annotation now works properly with nested tests, resolving JUnit integration issues that were affecting test organization and execution.
Additionally, the KubeApiTest
inheritance from base test classes has been fixed, providing better test framework compatibility and making it easier to structure your test suites.
Improved informer and watch operation stability
This release brings improvements to the Informer API.
You can now use Informer.isWatching()
to see the underlying Watch state, providing better visibility into watch operations and helping with debugging and monitoring of long-running watch connections.
CRD generation enhancements with annotation support
The CRD generator has been extended with support for @Annotations
and @Labels
in CRD generation. The CRD generator now includes metadata from these annotations, making it easier to generate comprehensive Custom Resource Definitions with proper annotations and labels.
The java-generator has also been enhanced to support the use of existing enumerations through extended existingJavaTypes
configuration.
Better WebSocket and connection handling
Several critical fixes have been implemented to improve connection stability:
- Fixed potential NPE in OkHttp WebSocket handling
- Ensured that streams are properly notified of errors
- Changed rolling update handling to use JSON merge patch to avoid 422 errors during deployment updates
These improvements make the client more reliable when dealing with long-running connections and deployment operations.
Note
Please note that you can still access newer Kubernetes clusters with older versions of the Fabric8 client.
The client provides a GenericKubernetesResources class to interact with resources that are not yet supported by the client. We do recommend to always use the latest version of the client to benefit from the latest features and bug fixes, but it's not mandatory.
Using this release
If your project is based on Maven, you just need to add the Fabric8 Kubernetes Client to your Maven dependencies:
<dependency>
<groupId>io.fabric8</groupId>
<artifactId>kubernetes-client</artifactId>
<version>7.4.0</version>
</dependency>
If your project is based on Gradle, you just need to add the Fabric8 Kubernetes Client to your Gradle dependencies:
dependencies {
api "io.fabric8:kubernetes-client:7.4.0"
}
Once your project is ready, you can create a new instance of the client to perform operations. In the following code snippet, I show you how to instantiate the client and retrieve a list of Pods:
try (KubernetesClient client = new KubernetesClientBuilder().build()) {
client.pods().list().getItems().forEach(p -> System.out.println(p.getMetadata().getName()));
}
How can you help?
If you're interested in helping out and are a first-time contributor, check out the "good first issue" tag in the issue repository. We've tagged extremely easy issues so that you can get started contributing to Open Source.
We're also excited to read articles and posts mentioning our project and sharing the user experience. Giving a star to the project, and spreading the word in general, helps us reach more users and broaden the feedback. Feedback is the only way to improve.
Project Page | Issues | Discussions | Gitter | Stack Overflow
