Pemrograman

Understanding Kubernetes Networking

Networking on Kubernetes is very challenging because you need to know how computer networks communicate. Kubernetes has a machine or virtual machine sharing mechanism between each application. So Kubernetes works using ports where the ports cannot be the same as others to avoid port conflicts.

The Kubernetes cluster will allocate IP addresses according to the needs of each, for example Pods, Services and Nodes with IP Address allocations that have been configured by the component:

  • Network plugin has been configured and set an IP Address for each Pod.
  • Kube-apiserver is configured and set IP addresses for each service.
  • And Kubelet or Cloud-controller-manager is configured and set IP Addresses for Nodes.

single node single pod

We can see and imagine that the interconnection of Pods has a local IP address which is assigned by our local system (Docker) so that communication between Pods can be possible.

single node multiple pods

If we have a lot of Pods running, Kubernetes will automatically create an IP Address for each Pod so that it is assumed that each Pod is a different new server, even though in reality it is stored in just one node, for example.

This IP Addressess mechanism, especially for Pods, has been determined and automatically executed when the Pods are created so that when the Pods communicate it will be via the Network route.

multiple nodes multiple pods

What if we have several Kubernetes Clusters where each node is likely to have the same IP Address?

  • All Pods can communicate on just one node without the need for NAT (Network Address Translation)
  • All Nodes can communicate with all Pods but need NAT (Network Address Translation)

At this level the network needs a helper that can connect nodes on Kubernetes, among others

  • Cisco ACI Network Psyllium
  • Big Cloud
  • Fabric
  • Flannel
  • VMware
  • Zest
  • Calico It depends on the platform you use when deploying a running Kubernetes Cluster.

network connection cluster nodes

comments powered by Disqus