Skip to content

slmmm/effective-spring-on-kubernetes

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 

Repository files navigation

effective-spring-on-kubernetes

Example applications show to use Spring Boot 2.4.x on Kubernetes. There are two types of sample application in this repo. Samples showing various approaches for containirzing Spring appliactions in the containerize folder. Samples showing features for running spring applications on Kubernetes in run folder. Each sample application has a readme.md that explains how to run the sample and points out interestning things to look at.

Software Prerequisites

  • Java 11 JDK
  • Favourite Java IDE Eclipse Spring Tool Suite or IntelliJ
  • Docker
  • dive tool for exploring container layers
  • k9s text gui for k8s
  • Kubernetes sample tested with Docker Desktop K8s. If you have a different k8s install you must know how to expose the app in k8s to your machine machine if you don't just use docker desktop k8s to run these demos.

Validate your Environment

  • Clone the repo
  • Go to the sample in containerize/fatjar-dockerfile
    • follow the setps for running the app this will ensure you have a working Java 11 and maven.
    • import the application into your favourite IDE
    • run the app from within the IDE
  • Test your docker dekstop Kuberentes using kubectl get nodes and you should see 1 node. On my machine I get the result below.
NAME             STATUS   ROLES    AGE   VERSION
docker-desktop   Ready    master   14d   v1.19.3

About

sample apps showing various ways of using spring boot on Kubernetes

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 79.3%
  • HTML 13.3%
  • Dockerfile 7.4%