Skip to main content
Redhat Developers  Logo
  • AI

    Get started with AI

    • Red Hat AI
      Accelerate the development and deployment of enterprise AI solutions.
    • AI learning hub
      Explore learning materials and tools, organized by task.
    • AI interactive demos
      Click through scenarios with Red Hat AI, including training LLMs and more.
    • AI/ML learning paths
      Expand your OpenShift AI knowledge using these learning resources.
    • AI quickstarts
      Focused AI use cases designed for fast deployment on Red Hat AI platforms.
    • No-cost AI training
      Foundational Red Hat AI training.

    Featured resources

    • OpenShift AI learning
    • Open source AI for developers
    • AI product application development
    • Open source-powered AI/ML for hybrid cloud
    • AI and Node.js cheat sheet

    Red Hat AI Factory with NVIDIA

    • Red Hat AI Factory with NVIDIA is a co-engineered, enterprise-grade AI solution for building, deploying, and managing AI at scale across hybrid cloud environments.
    • Explore the solution
  • Learn

    Self-guided

    • Documentation
      Find answers, get step-by-step guidance, and learn how to use Red Hat products.
    • Learning paths
      Explore curated walkthroughs for common development tasks.
    • Guided learning
      Receive custom learning paths powered by our AI assistant.
    • See all learning

    Hands-on

    • Developer Sandbox
      Spin up Red Hat's products and technologies without setup or configuration.
    • Interactive labs
      Learn by doing in these hands-on, browser-based experiences.
    • Interactive demos
      Click through product features in these guided tours.

    Browse by topic

    • AI/ML
    • Automation
    • Java
    • Kubernetes
    • Linux
    • See all topics

    Training & certifications

    • Courses and exams
    • Certifications
    • Skills assessments
    • Red Hat Academy
    • Learning subscription
    • Explore training
  • Build

    Get started

    • Red Hat build of Podman Desktop
      A downloadable, local development hub to experiment with our products and builds.
    • Developer Sandbox
      Spin up Red Hat's products and technologies without setup or configuration.

    Download products

    • Access product downloads to start building and testing right away.
    • Red Hat Enterprise Linux
    • Red Hat AI
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products

    Featured

    • Red Hat build of OpenJDK
    • Red Hat JBoss Enterprise Application Platform
    • Red Hat OpenShift Dev Spaces
    • Red Hat Developer Toolset

    References

    • E-books
    • Documentation
    • Cheat sheets
    • Architecture center
  • Community

    Get involved

    • Events
    • Live AI events
    • Red Hat Summit
    • Red Hat Accelerators
    • Community discussions

    Follow along

    • Articles & blogs
    • Developer newsletter
    • Videos
    • Github

    Get help

    • Customer service
    • Customer support
    • Regional contacts
    • Find a partner

    Join the Red Hat Developer program

    • Download Red Hat products and project builds, access support documentation, learning content, and more.
    • Explore the benefits

Deploy a Java application using Helm, Part 2

October 21, 2021
Daniel Oh
Related topics:
DevOpsHelmJavaKubernetes
Related products:
Red Hat JBoss Enterprise Application PlatformRed Hat OpenShift

    In the previous article in this series, you learned how to deploy Java applications to Red Hat JBoss Enterprise Application Platform (JBoss EAP) using Helm on Red Hat OpenShift. Developers can use the procedures in Part 1 to easily stand up traditional Java application servers on Kubernetes with predefined Kubernetes manifestos.

    What if you could have the same benefits when you develop microservices using JBoss EAP and Helm charts? JBoss EAP provides the Extension Pack (XP) to implement content trimming, packaging to a bootable JAR, and a MicroProfile specification including fault tolerance, monitoring, and tracing in support of microservices in the cloud. This article explains how to make a bootable JAR using JBoss EAP XP and Helm and deploy the application to OpenShift.

    Build a bootable JAR with JBoss EAP XP and Helm

    You will use the same Todo backend application that you deployed in the previous article. At the end of the tutorial, you will have both a traditional enterprise Java application and a bootable JAR for lightweight and independent deployment such as a microservices architecture, using a JBoss EAP XP Helm chart as shown in Figure 1.

    Note: The Helm charts for JBoss EAP 7.4 are a technology preview feature on OpenShift 4.8, so support is limited when you use these features in production environments.

    A diagram of the application development process using JBoss EAP, JBoss EAP XP, and a database.
    Figure 1. Application development process using JBoss EAP, JBoss EAP XP, and a database.

    Installing a JBoss EAP XP Helm chart

    Go to the developer console in Red Hat OpenShift and navigate to the Topology view. You will add the same project (eap-helm-demo) to OpenShift that you used in the previous article.

    Click the Add to Project icon on the left side and enter EAP into the search box. Then select the Eap Xp3 v1.1.0 Helm chart and click Install Helm Chart, as shown in Figure 2.

    Adding the JBoss EAP XP Helm chart.
    Figure 2. Adding the JBoss EAP XP Helm chart.

    Now define a specific build, image, and deployment for a bootable Todo back-end application. Switch to the YAML view to add build and deploy configurations, as shown in Figure 3. Use bootable JAR mode with the environment variables required for your PostgreSQL data source in your build. Also, set a single runtime using the replicas field in the deploy property:

    build:
      mode: bootable-jar
      env:
        - name: MAVEN_ARGS_APPEND
          value: -am -pl todo-backend -P bootable-jar-openshift
        - name: POSTGRESQL_DRIVER_VERSION
          value: '42.2.19'
    deploy:
      replicas: 1

    After you add the custom configuration in the YAML configuration, click on the Install button. You can find the entire YAML configuration at the Todo back-end repository.

    Adding a bootable jar configurations.
    Figure 3. Adding the bootable JAR configuration.

    Note: You will probably see an ErrImagePull or ImagePullBackOff message in the resources, as shown in Figure 4. Don't worry—your bootable JAR is building successfully, but your deployment will report ErrImagePull and ImagePullBackOff until the build is complete.

    ImagePullBackOff during deployment.
    Figure 4. ImagePullBackOff during deployment.

    Once the application build is complete, your image is automatically rolled out as shown in Figure 5. Create a connector between the JBoss EAP XP pod (Helm icon) and the PostgreSQL pod via the drag-and-drop feature in the Topology view.

    Successful build and deployment for JBoss EAP XP application.
    Figure 5. Successful build and deployment of your JBoss EAP XP application.

    When you click on Open URL, a new web page opens automatically. Copy the route URL for the next step.

    Testing the enterprise Java application

    When the deployment is complete, visit your Todo front-end application by opening a new window in a web browser and pasting in the route URL you copied in the previous step. Then click on the go button shown in Figure 6.

    To-do front-end GUI.
    Figure 6. Todo front-end GUI.

    Now you should be able to add, update, and remove items in the to-do list, as shown in Figure 7.

    To-do list.
    Figure 7. To-do list.

    What’s next

    This tutorial has shown how to make a bootable JAR with enterprise capabilities (e.g., database transactions) and deploy it to the cloud on Red Hat OpenShift using the JBoss EAP XP Helm chart. You can also define custom runtime environments such as health checks (e.g., livenessProbe, readinessProbe) and TLS termination. Then you can upgrade and roll back an existing Helm chart, applying the changes to the running bootable application instantly.

    Additional resources:

    • JBoss EAP XP 3.0.0 Quickstarts
    • Using MicroProfile with JBoss EAP XP 3.0.0
    • Red Hat JBoss EAP XP 3.0.0 Release Notes
    • Getting Started with JBoss EAP for OpenShift Container Platform
    Last updated: September 20, 2023

    Related Posts

    • Deploy a Java application using Helm, Part 1

    • Deploy Helm charts with Jenkins CI/CD in Red Hat OpenShift 4

    • Build Your "Hello World" Container Using Java

    • Deploy Node.js applications to Red Hat OpenShift with Helm

    • Deploy .NET applications on Red Hat OpenShift using Helm

    • You (probably) need liveness and readiness probes

    Recent Posts

    • Protect data offloaded to GPU-accelerated environments with OpenShift sandboxed containers

    • Case study: Measuring energy efficiency on the x64 platform

    • How to prevent AI inference stack silent failures

    • Preventing GPU waste: A guide to JIT checkpointing with Kubeflow Trainer on OpenShift AI

    • How to manage TLS certificates used by OpenShift GitOps operator

    Red Hat Developers logo LinkedIn YouTube Twitter Facebook

    Platforms

    • Red Hat AI
    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products

    Build

    • Developer Sandbox
    • Developer tools
    • Interactive tutorials
    • API catalog

    Quicklinks

    • Learning resources
    • E-books
    • Cheat sheets
    • Blog
    • Events
    • Newsletter

    Communicate

    • About us
    • Contact sales
    • Find a partner
    • Report a website issue
    • Site status dashboard
    • Report a security problem

    RED HAT DEVELOPER

    Build here. Go anywhere.

    We serve the builders. The problem solvers who create careers with code.

    Join us if you’re a developer, software engineer, web designer, front-end designer, UX designer, computer scientist, architect, tester, product manager, project manager or team lead.

    Sign me up

    Red Hat legal and privacy links

    • About Red Hat
    • Jobs
    • Events
    • Locations
    • Contact Red Hat
    • Red Hat Blog
    • Inclusion at Red Hat
    • Cool Stuff Store
    • Red Hat Summit
    © 2026 Red Hat

    Red Hat legal and privacy links

    • Privacy statement
    • Terms of use
    • All policies and guidelines
    • Digital accessibility

    Chat Support

    Please log in with your Red Hat account to access chat support.