IP Address Management

IP Address Management

  • How the virtual bridge network on the nodes assigned an IP subnet?
  • How are the pods assigned an IP?
  • Where is the information stored and who is responsible for ensuring there are no duplicate IP is assigned?

CNI Plugin Responsibilities

  1. Must support arguments ADD/DEL/CHECK
  2. Must support parameters container id, network ns, etc.
  3. Must manage IP Address assignment to Pods
  4. Must return results in a specific format.

How do we manage the APIs Kubernetes does not care how we do it. We just to do it by making sure we do not assign any duplicate APIs and manage it properly. The easiest way to do it is to store the list of APIs in a file and make sure we have the necessary code in our script to manage the file properly.

IPStatusPod
10.244.1.2AssignedNginx
10.244.1.3AssignedPython App
10.244.1.4Free
node1

The file would be placed on each host and manages the APIs of pods on the nodes.

IPStatusPod
10.244.2.2AssignedNginx
10.244.2.3AssignedNode App
10.244.2.4Free
node2

Instead of coding that ourselves in our script, CNI comes with two built-in plugins to which you can outsource the task to.

cat /etc/cni/net.d/net-script.conf

The CNI configuration file has a section called ipam in which we can specify the type of plug in to be used the subnet and route to be used. The details can be read from our script to invoke the appropriate plugin instead of hard coding it to use hosted local every time.

weaveworks manages IP addresses. weave by allocates the appearance 10.32.0.0/12 for the entire network.

10.32.0.1 ~ 10.47.255.254 That is about a milion APIs that you can use for pod on the network.

weaveworks solutions

Leave a Reply

Your email address will not be published.

ANOTE.DEV