This is a Spring Boot Admin instance using spring-cloud-starter-kubernetes-discoveryclient for service discovery. Therefore, it needs a running spring-cloud-kubernetes-discoveryserver. For this reason, the SBA server does not need kubernetes api permissions on kubernetes itself and uses the spring-boot-app helmchart.
Make sure discoveryserver is running before deploying this app.
You can run the whole build and installation with the following script or follow the step-by-step guide below.
chmod u+x buildAndInstall.sh
./buildAndInstall.sh
mvn clean install
docker build --tag spring-boot-admin:discocli .
We use the standard "app" helm chart here and NOT the "admin" helm chart as we do not need the k8s api access with this setup. The discoveryserver has the permissions and is providing the apps via rest api.
helm upgrade --install spring-boot-admin-discoveryclient ../../helm-charts/spring-boot-app -f deployment/values.yml
kubectl get pods -o wide
kubectl get services -o wide
kubectl get ingress
helm uninstall spring-boot-admin-discoveryclient
- http://localhost/spring-boot-admin-discoveryclient (requires traefik to be running)
kubectl get pods
kubectl port-forward <pod-name> 8081:8081