Recently, I along with some other experts in Container technologies gave an interview to The Enterprise Project where as one of the project leads of Eclipse JKube, I shared my insights on key points to consider while migrating Java workloads to containers.

You can read full article on their website:

Eclipse JKube

In my previous blogpost, I talked about Eclipse JKube Kubernetes Maven Plugin XML configuration and how you can use it to configure Eclipse JKube’s output image/manifests. Today in this blog, we’ll be looking at Eclipse JKube Resource Fragments: a configuration option specific to Kubernetes manifests(JSON/YAML).

What are Resource fragments?

In Eclipse JKube terminology, resource fragments are complete/partial JSON/YAML snippets which user places in src/main/jkube directory of this project in order to tweak JKube’s opinionated manifest generation mechanism according to his needs. This use is usually for users who have decent knowledge of Kubernetes primitive types.

Let’s say a user wants to add an additional…

Fabric8 Kubernetes Client

I recently saw a question on StackOverflow on how to do Rolling Updates/Rollbacks programmatically in Java using Fabric8 Kubernetes Client:

I saw an answer there which was outdated. I gave a new answer as per the latest API improvements but I thought it would be better to convert this into a blog post since it might be helpful for people who are looking for something like this. So today we’ll be taking a look at how to do rolling updates in for your Kubernetes resources (we’ll take Deployment as an example) programmatically in Java using Fabric8 Kubernetes Client.

Getting the Client:

If you…

Fabric8 Kubernetes Client

In today’s blog we’ll be looking on how we can update Kubernetes API objects in place programmatically in java using Fabric8 Kubernetes Client. In our latest release we’ve improved this patch API a lot and I thought it would be a nice idea to write a blog about it. In order to use Fabric8 Kubernetes Client, you would need to have Fabric8 Kubernetes Client as a dependency in your project. Here is what you’ll need to add if it’s a maven project:


Once dependency is added, you can start using the client. In order to…

Eclipse JKube

You might have seen in my previous blogs how Eclipse JKube simplifies image building process by providing opinionated defaults(also known as zero-configuration mode).

But sometimes, you might want to configure things in your application’s docker image. These include things like activating an additional port, adding extra files to your image, changing the entrypoint etc. In this blog, we’ll be taking a look at how you can make use of Eclipse JKube’s image XML configuration to create any kind of Docker image as per your needs. Eclipse JKube also works with Dockerfiles, we’ll see that in another blog.

Let’s say you…

Note: This blog is a part of blog Series: Deploying Java applications onto Kubernetes using Eclipse JKube

In previous blogs we have seen how to deploy Spring Boot, Quarkus, Vert.x or any web application based on Tomcat to Kubernetes with ease with the help of Eclipse JKube. Eclipse JKube has support for Micronaut applications too. We’ll do the same thing but for a Micronaut based project this time using Eclipse JKube. One thing to note here is that, the workflow remains unchanged for Eclipse JKube regardless of the framework it’s trying to deploy on top of Kubernetes.

Creating and configuring the sample code:

You can go…

Eclipse JKube

There are times when you want to apply some CustomResources along with your application’s workload resources like Deployment, Serviceetc. For this use case, you might want to use Kubernetes Maven Plugin’s resource fragments feature to provide custom YAML fragments to JKube in order to deploy during the apply phase. In this blog post, we’ll be taking a look at how we can provide our CustomResource fragments to Kubernetes Maven Plugin in order to deploy them during the apply phase.

Adding Kubernetes Maven Plugin to project:

In order to use deploy CustomResource fragments using Eclipse JKube, you need to have Kubernetes Maven Plugin added in your pom.xml…

Writing Kubernetes Sample Controller in Java

I recently saw this Sample Controller repository on kubernetes Github repository. This just implements a simple controller for watching CustomResource named Foo as defined within a CustomResourceDefinition.

I thought it would be a good idea to port this example which is written in GoLang to Java using Fabric8 Kubernetes Client to get an idea of doing these operations but in Java:

  • How to register a new custom resource (custom resource type) of type Foo using a CustomResourceDefinition.
  • How to create/get/list instances of your new resource type Foo.
  • How to setup a controller on resource handling create/update/delete events.

What are we going to build?

If you’re not…

Fabric8 Kubernetes Java Client

Fabric8 Kubernetes Client recently released 5.0.0 version with a focus towards improved support regarding CustomResource and Kubernetes Operator related usage. It’s already integrated into Java Operator SDK.

In this blog, we will be looking at all new improvements in detail. We’ll be looking at the difference in usage in Fabric8 KubernetesClient 5.x versus 4.x versions too. For this blog, let’s consider a simple CustomResource named Book :

kind: Book
name: effective-java
title: "Effective Java"
author: "Joshua Bloch"
isbn: "0134685997"

It’s based on this CustomResourceDefinition :

kind: CustomResourceDefinition

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store