Running Spring Boot Microservices On Kubernetes
Running Spring Boot Microservices On Kubernetes
If you want to Gain In-depth Knowledge on Spring Boot, please go through this
link Spring Boot Training
Service Discovery is the process of finding how to connect service and its workflow.
To deploy and test the sample Microservices, here it is needed to create an
environment. We will understand the process step-wise but in a simple way.
#) After this, we need to check that kubectl is communicating with the cluster
correctly or not.
$> kubectl cluster-info
Now, we can see that the cluster is started running and it is ready to deploy. Here
we will create a Demo application named “Hello World”, which consists of Spring
Boot services called “backend and frontend”.
Deployment creation:-
Deployment Verification:-
Hereunder, we can see that “-type=NodePort” specifies that the service is available
from the outside cluster.
Now we will check whether the service created successfully With Spring Boot
Course
$> kubectl get service
Creating Deployment
$>kubectl create -f frontend-deployment.yaml
In the end, we can remove all the services and their deployment.
$>kubectl delete service demo-frontend
$>kubectl delete deployment demo-frontend
$>kubectl delete service demo-backend
$>kubectl delete deployment demo-backend
This demo system in the Docker container creates a complete microservice. This
service is applied in Java by using spring and spring clouds.
Apache HTTP is used to provide the demo on the web page. It also forwards
requests of HTTP to the microservices. Here Apache HTTP is configured as a reverse
proxy and Kubernetes handles the load-balancing.