Skip to content

Simple sample of how to deploy Spring Boot Admin in OpenShift

Notifications You must be signed in to change notification settings

ricardozanini/spring-boot-admin-k8s

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spring Boot Admin within Kubernetes

This repo is an example of how to deploy Spring Boot Admin inside OpenShift/k8s to manage your Spring Boot Microservices.

How to use

Just import the two templates into differents projects, e.g.:

oc create -f https://raw.githubusercontent.com/ricardozanini/spring-boot-admin-k8s/master/openshift/spring-boot-admin.yaml -n <the_admin_project>

oc create -f https://raw.githubusercontent.com/ricardozanini/spring-boot-admin-k8s/master/openshift/temperature-service.yaml -n <the_services_project>

Create new apps using these templates via Web Console or command line:

oc project <the_admin_project>
oc new-app --template=spring-boot-admin

oc project <the_services_project>
oc new-app --template=temperature-service -e SPRING_BOOT_ADMIN_URL=http://spring-boot-admin.<the_admin_project>.svc:8080

Navigate to the Spring Boot Admin page and you are going to see something like:

Spring Boot Admin Dashboard

Try the Temperature Service Spring Boot application:

curl http://<hostname>/temperature/c/f/20
68.0

There's also the conversion from Fahrenheit to Celsius (try to figure that out 😄).

Known Issues

The discovery mechanism of this version (WIP) is not the ideal world. We're relying on services registering itself (per pod) on Spring Admin using their own internal cluster IP.

I'm working with the Spring Cloud Kubernetes library to have Spring Admin discovery the Spring Boot services using the k8s way.

About

Simple sample of how to deploy Spring Boot Admin in OpenShift

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages