Deploy Spring Boot microservices on Kubernetes  

Build and deploy Java Spring Boot microservices on a Kubernetes cluster

Last updated | By Anthony Amanse, John Zaccone, Animesh Singh


Spring Boot is an opinionated framework for quickly building production-ready Spring applications. This journey shows you how to create and deploy Spring Boot microservices within a polyglot application and then deploy the app to a Kubernetes cluster.


The Java community is finding innovative ways to use technologies like Java EE within microservices architectures. The Spring framework is an established presence in the Java ecosystem, and now Spring Boot is garnering a lot of attention because it radically simplifies writing a Spring application.

Spring Boot takes an opinionated view of building Spring applications. You can use Spring Boot to create stand-alone Java applications that can be started using the Java -jar command or more traditional WAR deployments. Spring applications can be deployed as WAR files atop existing app servers, or they can be built into a “fat” JAR file with an embedded app server. Either choice works well within a Docker container. You can then rely on native Spring platforms like Spring Cloud to perform tasks such as service discovery, registration, and load balancing.

But what do we do in the context of polyglot applications? For managing a system of polyglot microservices, you need a general-purpose microservices and container orchestration platform, and that’s where Kubernetes shines. In this developer journey, you’ll build an app called “Office Space” — and yes, it’s inspired by Michael Bolton’s idea in the movie Office Space. When you complete the journey, you’ll understand how to deploy a polyglot microservices application, including Spring Boot microservices, on a Kubernetes cluster.


  1. The Transaction Generator service written in Python simulates transactions and pushes them to the Compute Interest microservice.
  2. The Compute Interest microservice computes the interest and then moves the fraction of pennies to the MySQL database to be stored. The database can be running within a container in the same deployment or on a public cloud such as IBM Cloud.
  3. The Compute Interest microservice then calls the notification service to notify the user if an amount has been deposited in the user’s account.
  4. The Notification service uses OpenWhisk actions to send an email message to the user. You can also invoke an OpenWhisk action to send messages to Slack.
  5. Additionally, an OpenWhisk action to send messages to Slack can also be invoked.
  6. The user retrieves the account balance by visiting the Node.js web interface.

Related Blogs

Transformation Everywhere – IBM Code at CEBIT 2018

As you may already know, 2018 was a pivotal year for CEBIT for many reasons. The fair has undergone a complete makeover; you would hardly recognize it. After almost 50 years, the expo not only changed its name by capitalising every letter (CeBIT has transformed to become CEBIT), it also changed its scheduling, opting for...

Continue reading Transformation Everywhere – IBM Code at CEBIT 2018

Are You Developers? WeAreDevelopers, 2018

Earlier this month, we attended the WeAreDevelopers World Congress conference in Vienna. Named Europe’s largest playground for developers, founded as recently as 2015, the Congress has truly grown from strength to strength. This year, from May 16th – 18th there were 8,000 participants, 250+ speakers, 100+ sponsors, who all convened in Austria’s capital for 3...

Continue reading Are You Developers? WeAreDevelopers, 2018

Jax 2018 – Just An Awesome Experience

What a week! From 23rd to 27th April our Berlin team attended the Jax conference in Mainz, Germany. We had such a great time sharing our fresh perspectives, in the form of a rousing keynote and two informative sessions. The concept of this annual event with over 2,000 participants, revolves around innovating with Java, architecture,...

Continue reading Jax 2018 – Just An Awesome Experience

Related Links