Posts

Showing posts from 2019

Kubernetes with EKS and AWS Console

Image
Deploying a Spring boot application on a Kubernetes Cluster on AWS using EKS The goal of this post is to create a Spring boot Application and deploy it first on a local minikube cluster and then deploy it on a Kubernetes Cluster on AWS using Amazon EKS - Amazon Elastic Kubernetes Service. The post is derived from the official AWS documentation which is available at the following location: https://docs.aws.amazon.com/eks/latest/userguide/getting-started-console.html Pre-Requisites: You should have a AWS account setup.            Note, completing this activity would incur some expenses.So kindly provision your account accordingly. Install / Setup Kubectl                   https://kubernetes.io/docs/tasks/tools/install-kubectl/ Install / Setup AWS CLI                 https://docs.aws.amazon.com/cli/latest/userguide/install-cliv1.html Prefer aws cli version 1 run the following commands: aws --version aws configure Note: aws configure is used to co

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