Cloud Native 7 min read

Why Quarkus Is the Ideal Cloud‑Native Java Framework for Kubernetes

Quarkus is an open‑source, lightweight Java framework optimized for Kubernetes and serverless environments, offering fast startup, low memory usage, native compilation via GraalVM, reactive and imperative programming models, and seamless integration with Red Hat OpenShift, making it a compelling choice for modern cloud‑native development.

21CTO
21CTO
21CTO
Why Quarkus Is the Ideal Cloud‑Native Java Framework for Kubernetes

Overview

Quarkus is a cloud‑native, open‑source Java framework built for OpenJDK HotSpot and GraalVM, designed to run efficiently on Kubernetes. First stable release was in July 2020, and it is part of Red Hat Runtimes, a suite of tools for developing and maintaining cloud‑native applications.

Its small footprint and low memory requirements enable rapid startup, making it an ideal choice for Red Hat’s distributed cloud architecture platform.

Quarkus works both on the server side and the client side, leveraging the Java Virtual Machine to program containerized components.

It compiles and optimizes native Java code for serverless, cloud, and Kubernetes environments, and can also improve performance of non‑compiled Java stacks when running on OpenJDK.

Developer‑Friendly Configuration

Although not plug‑and‑play, Quarkus can be configured with minimal complexity, offering live coding features that let developers instantly see the impact of code changes and quickly fix bugs.

Developers can choose to run applications in JVM mode or compile them to native mode, selecting the Java framework they prefer.

Built on well‑known Java libraries, Quarkus benefits from over two decades of Java expertise, resulting in a shallow learning curve for Java professionals.

Programming Models: Reactive and Imperative

Co‑founder Jason Greene, a former Red Hat senior engineer, designed Quarkus to make Java a leading platform in Kubernetes and serverless environments. He provides both reactive and imperative programming models to address a wide range of distributed application architectures.

Traditional imperative programming remains central, while reactive development handles asynchronous, non‑sequential data events, complementing scalable cloud applications.

Reactive programming examples include NodeJS and AWS Lambda serverless computing, where instances are provisioned on demand.

Native Compilation Options

1. Native build: $mv package -Pnative or ./gradlew buildNative 2. Imperative example:

@Inject
SayService say;

@GET
@Produces(MediaType.TEXT_PLAIN)
public String hello(){
  return say.hello();
}

3. Reactive example:

@Inject @Channel("kafka")
Publisher<String> reactiveSay;

@GET
@Produces(MediaType.SERVER_SENT_EVENTS)
public Publisher<String> stream(){
  return reactiveSay;
}

Integration with OpenShift

Quarkus is part of Red Hat OpenShift 4.6, available to developers since November 2020. One‑fifth of cloud‑using Java developers consider adopting Quarkus, and its Kubernetes‑native nature makes integration with OpenShift especially valuable.

Red Hat provides an Application Migration Toolkit that helps migrate applications (e.g., from Oracle WebLogic to Red Hat EAP) and offers recommendations for using Quarkus without full code rewrites.

Red Hat supports developers in deploying Quarkus across data centers, edge devices, IoT, and public clouds, removing barriers to adoption.

References:

https://quarkus.io/

https://www.openshift.com/blog/red-hat-openshift-4.6-is-now-available

https://www.redhat.com/en/products/application-runtimes

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

ServerlessKubernetesQuarkusOpenShift
21CTO
Written by

21CTO

21CTO (21CTO.com) offers developers community, training, and services, making it your go‑to learning and service platform.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.