Posts

Showing posts from November, 2019

Swagger with Spring Boot

Image
Swagger For Documenting Rest Endpoints Swagger 2 is an open-source project used to describe and document RESTful APIs We will setup the swagger endpoints for the employee and oauth-client microservices. For more details regarding swagger, please refer to the official website: https://swagger.io/tools/swagger-ui/ The employee microservice and the oauth client setup have been explained in my previous posts. Kindly refer them to setup these applications. Adding maven dependencies < dependency > < groupId > io.springfox </ groupId > < artifactId > springfox-swagger2 </ artifactId > < version > 2.9.2 </ version > </ dependency > < dependency > < groupId > io.springfox </ groupId > < artifactId > springfox-swagger-ui </ artifactId > < version > 2.9.2 </ version > </ dependency > Setting up Swagger configurat

Deploy Spring Boot Application on Kubernetes

Image
Deployment on Kubernetes The blog assumes that minikube and kubectl are setup on your machine. In addition the OS supports virtualization. The setup can be done using the following link: https://kubernetes.io/docs/setup/learning-environment/minikube/ The blog focusses on deploying your spring boot application on a kubernetes. As a pre-requisite, the docker images for the applications that need to be deployed should already be present in a public docker hub repository. For more instructions , kindly refer to the previous blog post : Dockerization of Spring Boot applications. Configuration Files Creation of Deployment.yaml The first step is to create a deployment.yaml for each application. The deployment yaml contains instructions like the name of the application, the number of replicas, name of the image etc. The yaml files can be executed using kubectl which will enable kubernetes(minikube) to create a service, pod as