Posts

Showing posts from March, 2021

Kubernetes : Pod Communications, Deployments and ReplicaSets

Image
Lets start with the second blog on K8s where I will discuss on basics of pod communications and Deployments. You can read the previous blog to get an idea about K8s basics and details on pod. Pod Communications Here, in the above diagram, you can see two pods -  Pod A (IP - 10.0.1.16) with two containers - Con1 ( port - 8000) and Con2 ( port - 6000 ). Pod B (IP - 10.2.2.100) with container - Con1 ( port - 8087). Inter Pod Communication For a moment, consider Pod B container Con1 is trying to access both the containers of Pod A.This has to be done accessing the host and port - 10.0.1.16:8000 and 10.0.1.16:6000 to access Con1 and Con2 respectively in Pod A. Likewise, in order to access Con1 in Pod B, host and port - 10.2.2.100:8087 needs to accessed. This is how Inter Pod Communication occurs. Intra Pod Communication Now consider the scenario where in Pod A, Con1 tries to communicate with Con2.This can be done using the hostname as localhost and port as corresponding container port expos