how to explain couple of points on Kubernetes Calico Networking routing table? how to explain couple of points on Kubernetes Calico Networking routing table? kubernetes kubernetes

how to explain couple of points on Kubernetes Calico Networking routing table?


what kind of ip address is 10.6.16.1 if eth0 has IP of 10.6.22.111/21 - is it Internet Gateway ?

Yes, you are correct, this is indeed default(internet) gateway. So for example on your local computer default route would hold an IP of your home router.


Another worker node has two pods with the same IP=10.6.145.224 (pods calico-node-74hde и kube-proxy-internal) - how this is working/possible?

This is possible beacause they have set hostNetwork: true. Check it yourself running e.g.:

kubectl get po -n kube-system calico-node-74hde

and look for hostNetwork field. If this field is set to true, the pod (more specificaly containers within the pod) will not be network isolated and will have access to the host network interface, and this is why these pod have host IP.


Why do we need blackhole route?

I belive this calico issue may give us some answers.

I will try to explaint it. Imagine situation when there are 2 pod running and sending data over the network to each other.

When one of these pods gets deleted, the other pod may not recognise it and keep sending data to the IP address that does not exist (and because there is no pod, there is also no interface with the address).

So what shoud the node do if receives a packet with destination address that no longer exists?

Normally it would forward the packet according to the route rules. Now that there is no route rule associated with the pod (that just got deleted), the packet will get send according to the best match rule. If the blackhole rule exists, the packet will be dropped, but if there is no blackhole, packet will get forwarded (according to the best match rule) through the default gateway and you don't usually want this.


Let me know if it answers your questions.