Demystifying
the Nuts & Bolts of
Kubernetes Architecture
Pods101
2
Pod - Concepts
What is Pod?
Pod Deployment
Multi-Container
Pod Networking
Inter-Pod & Intra-Pod Networking
Pod Lifecycle
Pod Manifest File
A Typical Pod creation Workflow
3
Atomic Unit of Scheduling
Virtualization
Docker
Kubernetes
VM
Container
Pod
4
How Pods are deployed?
Cluster
Master
Scheduler
API Server
Pod
Container
5
Scaling the Pods to accommodate increasing traffic
Worker Node
Master
Scheduler
API Server
Pod
Container
6
What if node resources is getting insufficient?
Worker Node
Master
Scheduler
API Server
Pod
Container
7
What if node resources is getting insufficient?
Cluster
Master
Scheduler
API Server
Pod
Container
Worker-2
Worker-1
8
What if node resources is getting insufficient?
Cluster
Master
Scheduler
API Server
Pod
Container
Worker-2
Worker-1
9
2 Containers in a same Pod
Cluster
Master
Scheduler
API Server
Pod
Container
Worker-2
Worker-1
10
Pod Networking
Pod 1
Main Controller
:8080
10.0.30.50
Pod 2
Supporting
Controller
:7777
10.0.30.60
Supporting
Controller
:3000
How does these containers inside
Pods communicate with External
World?
12
Network Namespace
Pod 1
Main Controller
:8080
10.0.30.50
Pod 2
Supporting
Controller
:7777
10.0.30.60
Supporting
Controller
:3000
10.0.30.50:8080
10.0.30.50:3000
How does one Pod talk to another
Pod?
Welcome to Inter-Pod Communication..
14
Pod Networking
Pod 1
Main Controller
:8080
10.0.30.50
Pod 2
Supporting
Controller
:7777
10.0.30.60
Supporting
Controller
:3000
Pod Network
How does Intra-Pod
communication take place?
16
Intra-Pod Communication
Pod 1
Main Container
Supporting
Container
:8080
:3000
10.0.30.50
:8080 :3000
Localhost
17
A Look at Pod Manifest
18
Get a shell to a running Container
Verifying the Operating System
19
Get a shell to a running Container
Verifying the index page
root@nginx-pod:/# echo Hello shell demo > /usr/share/nginx/html/index.html
Stages of Life Cycle of Pod
Lifecycle of a Pod
Pending Running Succeeding
Pod
Pod Pod
Failed
Pod
API Server
Manifest
A Typical Pod Creation WorkFlow
Credits: Viktor Farcic
Demo
Deploying Your First Nginx Pod
Viewing Your Pod
Where is your Pod running on?
Pod Output in JSON
Executing Commands against Pod
Terminating a Pod
Adding a 2nd container to a Pod
24
References
https://kubelabs.collabnix.com
https://kubetools.collabnix.com
25
Thank You