Skip to content

Load Balancer is a microservice application built with Spring Boot. It provides an endpoint to check the status of the service and is deployed in a Kubernetes cluster. This service interacts with other microservices and is designed to be simple and efficient.

Notifications You must be signed in to change notification settings

mikailakar/LoadBalancer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

Load Balancer

Load Balancer is a microservice application built with Spring Boot. It provides an endpoint to check the status of the service and is deployed in a Kubernetes cluster. This service interacts with other microservices and is designed to be simple and efficient.

Features

  • Status Endpoint: Returns a message including the hostname of the pod serving the request.
  • Kubernetes Deployment: Deployed as a Load Balancer service in a Kubernetes cluster.

Getting Started

Prerequisites

  • Docker
  • Kubernetes (Minikube)
  • Maven (JDK 17)

Building the Application

  1. Clone the Repository

    git clone https://github.com/mikailakar/LoadBalancer.git
    cd LoadBalancer/order-service
  2. Start Minikube

    minikube start
  3. Build the Application

    mvn clean package
  4. Build the Docker Image

    docker build -t order-service:1.0.0 .
  5. Deploy the Application

    kubectl apply -f k8s/order-service.yaml
  6. Deploy using Skaffold

    skaffold run
  7. Verify the Deployment

    kubectl get pods
  8. Create a Tunnel

    minikube tunnel
  9. Verify the Service

    kubectl get svc
  10. Test the Load Balancer

    Open Postman, create one GET end-point at http://127.0.0.1:8080/status and uncheck Connection(keep-alive). You should see a message indicating the hostname of the pod.

About

Load Balancer is a microservice application built with Spring Boot. It provides an endpoint to check the status of the service and is deployed in a Kubernetes cluster. This service interacts with other microservices and is designed to be simple and efficient.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published