https://github.com/ricardozanini/spring-boot-admin-k8s
Simple sample of how to deploy Spring Boot Admin in OpenShift
https://github.com/ricardozanini/spring-boot-admin-k8s
java k8s openshift spring-boot spring-boot-admin
Last synced: about 1 month ago
JSON representation
Simple sample of how to deploy Spring Boot Admin in OpenShift
- Host: GitHub
- URL: https://github.com/ricardozanini/spring-boot-admin-k8s
- Owner: ricardozanini
- Created: 2018-08-16T20:08:02.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-08-17T22:04:05.000Z (almost 8 years ago)
- Last Synced: 2025-02-01T21:41:21.664Z (over 1 year ago)
- Topics: java, k8s, openshift, spring-boot, spring-boot-admin
- Language: Java
- Size: 44.9 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## 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.:
```shell
oc create -f https://raw.githubusercontent.com/ricardozanini/spring-boot-admin-k8s/master/openshift/spring-boot-admin.yaml -n
oc create -f https://raw.githubusercontent.com/ricardozanini/spring-boot-admin-k8s/master/openshift/temperature-service.yaml -n
```
Create new apps using these templates via Web Console or command line:
```shell
oc project
oc new-app --template=spring-boot-admin
oc project
oc new-app --template=temperature-service -e SPRING_BOOT_ADMIN_URL=http://spring-boot-admin..svc:8080
```
Navigate to the Spring Boot Admin page and you are going to see something like:

Try the Temperature Service Spring Boot application:
```shell
curl http:///temperature/c/f/20
68.0
```
There's also the conversion from Fahrenheit to Celsius (try to figure that out :smile:).
### 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](https://github.com/spring-cloud/spring-cloud-kubernetes) to have Spring Admin discovery the Spring Boot services using the k8s way.