I want to maintain my spring boot application and mysql in one pod. I've tried with separate pods for each one and it's working fine. I want to bind both into single pod. how can i achieve that?
Related
I have a Spring boot Application deployed in the K8S cluster, which is being exposed using the ingress component. I am using the h2 database for testing purposes in one of the environments (review env) and want to access the h2 console for the deployed spring boot application. I am not sure how to achieve this. I tried appending the h2 DB console address to my app ingress endpoint like http://myapp.com/h2-console, but I have no luck here, any help on this would be much appreciated.
I am new learner for Spring Boot. I have refer some YouTube channel for learning myself. But in Udemy course only there has using Docker itself. No YouTube channel using Docker.
Can I able to create a Spring Boot application without using Docker?
Is Docker important to develop an Application in Spring Boot?
The answer is yes, you can use spring without docker. To do this, just install java on your computer.
Usually, docker is used in order to be able to work with other resources, such as a database, rabbitmq, etc.
Docker makes it easy for you to interact with external resources, but it's not required.
Docker is another concept. You can learn spring boot independently. The concept of containerization brings in the docker.
Docker is basically an application that facilitates containerization. In order to learn spring boot you don't need docker. Docker can be used with any application, you will have to create containers and then create/use applications inside the docker.
Learn spring boot first, have some grip on it and then proceed towards the concept of containerization.
I am using spring boot with Kubernetes and Eventhub. To connect with Azure Eventhub i use spring cloud stream. What is the math to determine the number of pods assuming non reactive spring boot application with apache tomcat?
Edit 1: to reframe my question, how do you factor in spring boot performance , request rate , user count, etc while scaling the pods?
In general the number of pods can be managed with a Deployment in Kubernetes. For more information you can see here kubernetes.io. In a Deployment you tell Kubernetes how many Replicas you want, which means how many Pods should be running. I don't know what you mean with non reactive spring boot application with apache tomcat. I also don't know about spring cloud stream.
Is there any recommended approach to taking Heapdumps & Threaddumps for a Spring Boot app running in a Pod on AKS?
And how to download the dump afterwards to my desktop?
There are many ways to take a heapdump and threaddumps. The easiest way for a Spring Boot app should be the Actuator endpoint.
https://docs.spring.io/spring-boot/docs/current/actuator-api/htmlsingle/#heapdump
Problem
Trying to use Spring boot admin to do a deep monitoring of spring boot micro services running in Kubernetes.
Spring boot admin listing the micro services but pointing to the internal IPs.
Spring boot admin application listing page showing the internal IP
The application details page has almost zero info
Details
Kubernetes 1.15
Spring boot applications are getting discovered by Spring boot admin using Spring cloud discovery
spring-cloud-kubernetes version 1.1.0.RELEASE
The problem is that the IPs are of internal pod network and would not be accessible to the users in any real world scenario.
Any hints on how to approach this scenario ? Any alternatives ?
Also I was wondering how spring boot admin would behave in case of pods with more than one replica. I think it is close to impossible to point to a unique pod replica through ingress or node port.
Hack I am working on
If I can start another pod which exposes the Linux desktop to the end user. From a browser of this desktop, user may be able to access the pod network ips. It is just a wild thought as a hack.
Spring Boot Admin register each application/client based on its name by below property.
spring.boot.admin.client.instance.name=${spring.application.name}
If all your pods have same name it can register based on individual ips by enabling perfer-ip property (which is false by default):
spring.boot.admin.client.instance.prefer-ip=true
In your case, you want to SBA to register based on the Kubernetes load balanced url, then service-base-url property should be set the corresponding application's url.
spring.boot.admin.client.instance.service-base-url=http://myapp.com