Posts

Showing posts with the label Docker

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...

Dockerization of Spring Boot application

  Dockerization of spring Boot The post explains you how to conatainerize the previously created Resource server and the Auth Server using Docker. The post assumes that the following pre-requisites are completed: Docker is setup on your machine https://docs.docker.com/get-started/ You have an account setup with docker hub.( This enables us to store our docker images in docker hub) You have created a public repository in docker hub. Docker file creation The first step is to create a docker file for all the microservice applications: Employee Microservice - Docker File FROM openjdk:8-jdk-alpine MAINTAINER PRASHANT LABEL description="Employee Microservice" ADD ./target/employee-0.0.1-SNAPSHOT.jar /app/service.jar EXPOSE 7003 CMD ["java", "-Xmx1024m", "-jar", "/app/service.jar"] Similarly create for the other microservic...