Kubernetes Network

As many of you know kubernetes architecture is composed by two main component Master node and Worker node, when you start your first kubernetes installation  you need to setup these components but after you finish to run your commands you realize your cluster isn’t ready to run pod because you need to install your network plugin! Yes, kubernetes doesn’t provide any network solution but use plugin instead, common plugins are:

Kubenet
Container Network Interface, standard under CNCF that aim to provide a common interface
between various networking solutions and container runtimes

A network plugin by default has some requirements:

All pod can communicate with each other across nodes
All nodes can communicate with all pods
No Nat is required

So basically kubernetes assign a virtual IP address to setup routing and network, the things we need to keep in mind in kubernetes the lowest compute unit is not the container but the pod ( a group of container ) on network perspective we need to assign ip addresses to pods and routing communication between pods on any nodes. From the POD perspective we have this situation:

POD has a single ip
when a container spawn share the same network namepsace inside a pod
two container in a pod communicate via localhost because they share the same network namespace
network namespace sharing is possible inside the pod via the pause container

What we learned today is in kubernetes all IP are routable without NAT via phisical infrastruture or network plugin like Flannel – Calico. A detailed guide is covered here!

Comments

Popular posts from this blog

Happy Easter Think2018!

How to create and test ssh keys for IBM Cloud Private

Last steps to install IBM Cloud Private v2.1