In this tutorial, we will see what is the Architecture of Kubernetes Node.
Below is the Architecture diagram of Kubernetes Nodes, and it has lot of information in it.
In above diagram, in Green boxes you can see the Pods, so Pod 1, Pod 2, Pod 3 are in Node 1, and Pod 4, Pod 5, and Pod N are in Node 2.
Within these Pods, we have containers. Pod 2, and Pod 5 have only 1 container, Pod 3, Pod N has two containers, and Pod 1, and Pod 4 has three containers.
These pods can communicate with each other very easily using localhost and port number.
Pods within a cluster can also communicate with each other, but they need to go over a network. In service discovery, you will learn how pods communicate with each other within a cluster.
Pods and containers are running on Docker. So, each node has running a Docker on it. You can also use an alternative of container engine, but in above diagram we are using Docker as container engine.
On each node, you can see kubelet, and kube-proxy service running. Where kubelet is responsible for launching the pods, its going to connect to master node to get all the information.
kube-proxy is going to feed the information about pods into iptables. Whenever a pod is launched, kube-proxy is going to change the iptables rules to make sure that pods are routable within the cluster.
Lets see the service, to remember service you can imagine the load balancer. All trafic comes to LoadBalancer and then it arives at iptables. iptables has all the rules to forward trafic to another node, if the pod is running on another node. If pod is running on the same node then it will forward trafic to the pod directly.
416 total views, 1 views today