Deploy Java on Kubernetes

Connect a Git repository and Wodby builds your Java code, deploys it to a Kubernetes cluster of your choice, and gives it a domain with HTTPS. PostgreSQL and Valkey are optional services of the same stack.

A ready Java stack

The stack defines the services, how they connect, and their default settings. You choose the optional services, versions, and resources, and write no Kubernetes manifests or Helm charts.

CI/CD without a separate setup

Wodby CI builds each push to the branch an environment follows, and the pipeline deploys the result. GitHub Actions, GitLab CI, and CircleCI can run the same steps with Wodby CLI.

Certificates, backups, and updates

HTTPS certificates are issued and renewed for your domains. Updates of the stack’s services, cron schedules, and backups of its databases are set up in the dashboard.

Build and release

What happens when you deploy Java on Wodby

A Java deployment compiles your repository with Maven or Gradle during the image build and keeps only the runnable jar. The build tool is picked from the files at the root of the repository.

The build detects Maven or Gradle

A Maven project is built with its own Maven wrapper when the repository has one, and with Maven from the image otherwise. A Gradle project is built with the Gradle wrapper it brings along.

The runnable jar is found for you

Source, javadoc, test, and plain jars are ignored, and the image keeps only the jar that runs. When a multi-module project leaves more than one, a build variable names the jar to start.

Build arguments and a custom command

One build variable adds arguments to the Maven or Gradle run, and another replaces the build command altogether. A Dockerfile in your repository replaces the default build entirely, as the boilerplate shows.

Workspace rebuilds on every change

In a development workspace Wodby rebuilds the checkout after each change and restarts the application, which usually takes seconds. If a build fails, the last good build keeps running and the compiler errors appear in the service logs.

The image build skips tests

The Maven build packages your project without compiling or running tests. The boilerplate's pipeline runs them, and your own pipeline can do the same.

Read the Java stack guide for setup steps, settings, and limits.

Bring an existing application

Move an existing Java app to Wodby with your agent

Give your coding agent access to your repository and connect Wodby through MCP. Ask it to map your app to maintained services and flag what needs to change before deploying.

Review the plan first, then approve an isolated staging deployment. Production data transfer and cutover need separate approval. MCP access does not itself grant access to your repository.

Java planning prompt
Load Wodby’s migration guidance. Inspect this Java application repository and propose a Wodby deployment plan. Identify the runtime, database, background jobs, persistent files, and required secret names without revealing values. List missing information and plan an isolated staging deployment. Do not create resources, transfer production data, change DNS, or deploy anything yet.

What Wodby sets up for Java

Running Java on Kubernetes takes more than an image: a registry to keep it in, a deployment for every service, routing with certificates, and backups of whatever stores data. Wodby provides each of these, and the Java stack adds the settings that are specific to Java.

The result is an ordinary Kubernetes deployment in the cluster you chose. If you stop using Wodby, a cluster in your own account or on your own server stays yours, and the apps on it keep running.

How an app is organized

  • An app has one or more environments, such as production, staging, and dev. They share the stack and can run on different clusters.
  • Pull requests can get temporary preview environments, built from the pull request branch.
  • Scripts from your repository can run before a new build receives traffic. If one fails, the previous version keeps serving.
  • When a service fails its health checks after an upgrade, Wodby attempts to roll it back to its last successful release.

What you get with Wodby

How to deploy Java on Wodby

  1. 1

    Choose where the app runs: Wodby Cloud, a managed Kubernetes cluster in your cloud account, or your own server.

  2. 2

    Create an app from the Java stack. Start from a boilerplate or connect your own repository.

  3. 3

    Select the optional services the app uses, then set domains, environment variables, and resources.

  4. 4

    Deploy. After that, a push to the environment’s branch builds and deploys the change.


Read more about stack management in our documentation.

Before you start

You need a Wodby account and your code in a Git repository. Wodby CI builds from GitHub, GitLab, and Bitbucket; with your own CI the repository can be anywhere.

Wodby is priced per app service. The cluster is billed separately by whoever runs it: your cloud provider, your server host, or Wodby Cloud.

Still choosing where to run it? Compare the options on the Java hosting page.

Start deploying

Deploy Java on Wodby

Create an account, choose the Java stack, and connect your repository.

Stack-specific feature

Start from the Wodby Java boilerplate

The Java boilerplate is a small web application on the JDK’s built-in HTTP server, with no other dependencies. It is a working project to deploy first and replace with your own code.

It builds with Maven and runs its tests in the pipeline, which shows where the build and the tests of your own project belong.

Hosting options

Run your apps where it suits you

In your own cloud account, on a server you already rent, or on Wodby Cloud. The stacks and the deployment workflow are the same on all three, and Wodby maintains the cluster.

Lowest cost

Kubernetes on your own server

Use a dedicated server or VM you already rent, from Hetzner, OVH, or any other host. Wodby installs Kubernetes on it, keeps it up to date, and deploys your apps.

  • No managed control plane to pay for
  • One command installs Kubernetes on the server
  • Join more servers as worker nodes when you need capacity
  • Operating system updates install when you choose
Explore self-hosted Kubernetes

We handle everything

Wodby Cloud

Deploy without a cloud account or a server of your own. Wodby creates and operates the cluster, and you pay for the nodes and storage you run.

  • Nothing to connect or set up before your first deploy
  • A free demo cluster to try the workflow first
  • Scales between the node counts you set
  • The same stacks and deployment workflow as your own cluster
See Wodby Cloud

Connect the services your apps already use

An integration links Wodby to an account you already have, such as your Git provider, a storage bucket for backups, or an API your app calls.

Connected once
Set up a service once and reuse it across your apps.
Out of your code
Credentials stay out of your repositories and are managed in one place.
Per environment
Override any value for each environment.
Stack preview

Services in the Java stack

Stack serviceBase serviceRole
Java
JavaPrimary
PostgreSQL
PostgreSQLDisabled by default
Valkey
ValkeyDisabled by default
Mailpit
MailpitDisabled by default
OpenSMTPD
OpenSMTPDDisabled by default
Gotenberg
GotenbergDisabled by default
Cloud PostgreSQL
Cloud PostgreSQLDisabled by default
OpenTelemetry Collector
OpenTelemetry CollectorDisabled by default

Next step

Try the Java stack in your own account

Creating an account is free. Check the pricing to see what an app costs once it runs in production.

What our customers say

From teams that run their applications on Wodby.

  • We moved our Drupal hosting to use Wodby and changed our development workflow to use Docker at the same time. Now we can concentrate on Drupal development and we're not losing time configuring servers etc. When a site needs additional resources or hosting in a different region we can be way more responsive as deploying a new instance takes no time at all.

    Tony Miller
    Eighty Options
    Tony Miller, Eighty Options
  • Wodby’s innovative infrastructure helped us to increase the speed and simplify our app deployment, while also leaving us the freedom of handling our hosting and not locking us on a specific pattern. We are now much more robust for future growth and will be able to innovate faster.

    Martin Normann Lund
    Ramsalt Lab
    Martin Normann Lund, Ramsalt Lab
FAQ

Frequently Asked Questions

Have questions? We've got answers. If you don't see your question here, feel free to reach out.

Get started

Ready to deploy Java?

Choose Wodby Cloud, managed Kubernetes, or your own server, then deploy stacks with CI/CD, backups, SSL, integrations, and environment management in the same platform.

  • Run the same stack workflow on Wodby Cloud, managed Kubernetes, or your own server
  • Deploy app environments for production, staging, previews, and development
  • Use Wodby CI or your existing pipeline with the Wodby CLI
  • Keep backups, certificates, integrations, and access control in the platform

Start for free

No credit card required
$0/month
  • 10 app services
  • 30 minutes of integrated CI
  • 5 GB of private registry
  • Stacks & integrations
  • Technical domains with SSL
Create free account
Upgrade when you need more capacity