Posts

Showing posts from 2020

My External Publications

Here is a list of my Publications in external websites:

1. Article on Policy Iteration Algorithm explained using a simple game involving a pirate ship with rewards and benefits. This algorithm is a part of ReInforcement Learning, an offshoot of Machine Learning.

Title: Policy Iteration in RL: A step by step Illustration
Link: https://towardsdatascience.com/policy-iteration-in-rl-an-illustration-6d58bdcb87a7


Difference between port and targetPort in Kubernetes

Image
Overview:In the previous post, we deployed a  simple microservice to Kubernetes. In this post, we would take a look at the various port mappings available for an application in Kubernetes and the differences between them.


Port Mappings:Let us take a look at the service yaml file created in previous post. 

You must be wondering that there are so many port mappings available in the yaml file, and what each of those means.
There are two port mappings available, port and targetPort. There is also a third option., when we use Service type as nodePort, we can also provide a specific nodePort which could be used.
Explanation of Ports:NodePort:
When we use nodePort Service type, Kubernetes assigns a static port through which external clients can access the service. In our example, it is 31869.
Port:
Port (8086), is the port through which other services in the same node or other nodes within the cluster can access the service. 
TargetPort: TargetPort (8085), is the port through which the actual Pod is…

Deploying a Spring Boot App on Kubernetes

Image
OverviewIn this post, I will be explaining how to deploy a simple Spring Boot Application onto Kubernetes. I will be using MicroK8s for the Kubernetes environment. For a quick guide on how setup MicroK8s refer here.
Spring Boot App Docker Image:Let us create a simple Spring Boot application and dockerize it. The source could be downloaded from github repo here. Build the jar file and then dockerize it. I will be using the docker image from local, we can also push/pull this image from a Docker Repository. Docker command to dockerize the app is:
docker build -t basic-microservice:local .
Run the command 'docker images' and you should be able to see the docker image 'basic-microservice:local'. I have tagged the image as 'local' and not as latest. This is because, since we are using local images for Kubernetes, MicroK8s has a workaround for using local images.
Follow the instructions here, to upload docker image to MicroK8s cache.
Create Deployment in Kubernetes:Let us cr…

Kubernetes Basics

Image
Overview:Kubernetes has become the leader in Container Orchestration and a working knowledge of Kubernetes is essential for every developer.
In this post I am going to cover some very basic concepts of Kubernetes.




Concepts:Pod is a logical unit containing one or more containers (if you use a side car). It is the smallest execution unit. Replica Set represents number of instances of pods which are running. Used for scaling of pods. Stateful Set represents unique pods which retain state while running. We use Stateful Set while working with stateful workloads like a database cluster or a master slave configuration of workload. Deployment represents abstraction used to represent and update Pods and ReplicaSets. We use deployment as a "kind" in the yaml files while deploying an app in Kubernetes. Service is used for defining how we expose/access an application within a Pod.
Generally when we expose an application in Kubernetes using Service, there are four options: Cluster IP - Apps are …