> Markdown version of [/videos/242-microservices-how-to-get-started-with-spring-boot-and-kubernetes?t=28](https://www.wearedevelopers.com/videos/242-microservices-how-to-get-started-with-spring-boot-and-kubernetes?t=28). Every page supports `.md` or `Accept: text/markdown`. Links point to the HTML versions so they work for humans too. Agent guide: [/agents.md](https://www.wearedevelopers.com/agents.md). --- # Microservices: how to get started with Spring Boot and Kubernetes Miro escaped a slow-building monolith by strategically transitioning to microservices. Discover how they leveraged Spring Boot and Kubernetes to conquer distributed complexity and ensure zero-downtime deployments. - **Speakers:** Aleksandr Kalikov - **Event:** WeAreDevelopers LIVE - **Published:** September 1, 2021 - **Duration:** 1:02:46 - **URL:** https://www.wearedevelopers.com/videos/242-microservices-how-to-get-started-with-spring-boot-and-kubernetes ## Summary Miro's transition from a tightly coupled, slow-building monolith to a scalable microservices architecture required navigating increased distributed system complexity. Selecting mature, familiar technologies—specifically Spring Boot and Kubernetes—helped eliminate uncertainty during the initial migration phase. The transition strategy involved implementing new features as microservices right away while gradually isolating existing monolithic components. Building a production-ready microservice involves more than just writing code; it requires efficient containerization and robust orchestration. Utilizing Spring Boot's layer extraction for Docker image builds drastically improves caching by separating dependencies from frequently changing application code. Deploying this containerized service locally via Minikube requires defining essential Kubernetes objects—Namespaces, Deployments, Services, and Ingress—along with ConfigMaps mapped through Spring Cloud Kubernetes to externalize application properties securely using Role-Based Access Control (RBAC). Distributed systems rely heavily on proactive observability and strict lifecycle management. Integrating Micrometer and Spring Boot Actuator with the Prometheus Operator exposes vital JVM metrics and health states via Liveness, Readiness, and Startup probes. A critical realization in Kubernetes deployments is handling zero-downtime rolling updates; without specifically configuring Spring Boot's graceful shutdown and implementing a Kubernetes preStop hook, incoming asynchronous traffic can be routed to a pod already receiving a SIGTERM signal. Finally, because containerized applications have less borders to the host operating system, enforcing strict security measures—such as removing root privileges, auditing images with tools like Trivy or Dockle, and adhering to the principle of least privilege—is paramount. **Keywords:** spring boot microservices, kubernetes deployment strategy, monolith to microservices migration, docker image layering caching, minikube local environment, kubernetes configmap rbac, spring cloud configuration, spring boot actuator observability, prometheus operator monitoring setup, jvm memory limits kubernetes, liveness and readiness probes, graceful shutdown prestop hooks, zero-downtime rolling updates, container security vulnerability scanning, gRPC inter-service communication ## Chapters 1. **Transitioning from a monolith to a microservice architecture** (00:28) — Understanding the operational complexities that accompany splitting monolithic applications into scalable distributed systems. 1. **Evaluating orchestration tools for distributed container deployments** (03:47) — Evaluating container management solutions including Kubernetes, Docker Swarm, and HashiCorp Nomad helps scale modern workloads. 1. **Understanding Kubernetes core components and local environment tools** (06:16) — Understanding how controllers, pods, and schedulers operate alongside testing solutions like Minikube resolves local cluster setup frustrations. 1. **Choosing a Java framework for microservice development** (10:09) — Comparing prominent Java frameworks and selecting Spring Boot reduces transition uncertainty for established developer teams. 1. **Scaffolding a Spring Boot web application with Maven** (11:05) — Setting up a basic REST controller in a new Spring Boot application quickly establishes initial web service boundaries. 1. **Building and optimizing Docker images using Spring Boot layers** (14:21) — Structuring Docker images efficiently by separating application changes from static dependencies leverages caching to optimize slow build processes. 1. **Deploying the Docker image into a local Kubernetes cluster** (18:36) — Defining standard objects like namespaces, deployments, and ingress resources enables routing external traffic directly to local containers. 1. **Externalizing configuration using Kubernetes config maps** (24:30) — Managing application properties dynamically by binding ConfigMaps directly to Spring Cloud property sources prevents static hardcoded secrets leaking. 1. **Configuring application observability with Micrometer and Prometheus** (28:34) — Exposing actionable application metrics via Spring Actuator endpoints for scraping by Prometheus Operator improves runtime visibility. 1. **Managing container resource limits and Java memory options** (41:41) — Allocating heap versus non-heap memory arguments carefully prevents out-of-memory errors by respecting hard resource constraints configured in Kubernetes. 1. **Configuring automated liveness and readiness probes in Kubernetes** (42:53) — Using predefined Actuator health indicators to continuously evaluate whether a service can accept traffic prevents routing requests to unready pods. 1. **Managing graceful container shutdown during rolling updates** (45:43) — Delaying termination signals to safely drain in-flight network traffic prevents dropped client requests from occurring during seamless version rollout deployments. 1. **Evaluating communication protocols for high performance microservices** (53:12) — Considering alternative lightweight data structures like Protocol Buffers based on load balancer requirements optimizes high volume throughput requests. 1. **Securing Kubernetes workloads and containerized image layers** (56:24) — Applying least privilege principles and performing structural image scans mitigates operational vulnerabilities embedded within unverified dependencies. 1. **Reviewing deployment strategies and monitoring guidelines** (57:43) — Answering practical platform questions on vulnerability scanning options and endpoint monitoring distinctions clarifies essential operational responsibilities. ## Related Moments - [Transitioning from monolith architectures to microservices and Kubernetes](https://www.wearedevelopers.com/videos/108-get-ready-for-operations-by-pull-requests) (from "Get ready for operations by pull requests") - [Optimizing software development for production and Kubernetes](https://www.wearedevelopers.com/videos/383-kubernetes-native-java) (from "Kubernetes Native Java") - [Refactoring a complex legacy monolith into microservices](https://www.wearedevelopers.com/videos/371-retooling-and-refactoring-an-investment-in-people) (from "Retooling and refactoring - an investment in people.") - [Introduction to Kubernetes security challenges and opportunities](https://www.wearedevelopers.com/videos/412-kubernetes-security-challenge-and-opportunity) (from "Kubernetes Security - Challenge and Opportunity") - [Technology stack for building robust microservices applications](https://www.wearedevelopers.com/videos/89-development-of-reactive-applications-with-quarkus) (from "Development of reactive applications with Quarkus") - [Evaluating microservices against traditional monolithic application design](https://www.wearedevelopers.com/videos/251-remote-driving-on-plant-grounds-with-state-of-the-art-cloud-technologies) (from "Remote Driving on Plant Grounds with State-of-the-Art Cloud Technologies") ## Related Articles - [Learning Kubernetes made easy with KubeCampus](https://www.wearedevelopers.com/magazine/348-learning-kubernetes-made-easy-with-kubecampus) - [Why You Shouldn’t Build a Microservice Architecture](https://www.wearedevelopers.com/magazine/118-why-you-shouldn-t-build-a-microservice-architecture) - [MLops – Deploying, Maintaining And Evolving Machine Learning Models in Production](https://www.wearedevelopers.com/magazine/115-mlops-deploying-maintaining-and-evolving-machine-learning-models-in-production) - [Building AI Solutions with Rust and Docker](https://www.wearedevelopers.com/magazine/494-building-ai-solutions-with-rust-and-docker) ## Related Jobs - [Java Softwareentwickler - Spring Boot & Microservices](https://www.wearedevelopers.com/jobs/ext/1306817-java-softwareentwickler-spring-boot-microservices) at **Aok Systems Gmbh** - [Senior DevOps Consultant](https://www.wearedevelopers.com/jobs/ext/1247667-senior-devops-consultant) at **Aok Systems Gmbh** - [Lead Cloud DevSecOps Engineer - Kubernetes](https://www.wearedevelopers.com/jobs/ext/1659167-lead-cloud-devsecops-engineer-kubernetes) at **BWI GmbH** - [Platform Engineer (DevOps)](https://www.wearedevelopers.com/jobs/48264-platform-engineer-devops) at **WDW Consulting GmbH** - [Devops Engineer](https://www.wearedevelopers.com/jobs/ext/1940926-devops-engineer) at **Bitpanda** - [Senior Backend Engineer (Java)](https://www.wearedevelopers.com/jobs/ext/19369-senior-backend-engineer-java) at **Bonial International GmbH**