0 votes
in Kubernetes K8s by
What is Ingress network, and how does it work?

1 Answer

0 votes
by

Ingress network is a collection of rules that acts as an entry point to the Kubernetes cluster. This allows inbound connections, which can be configured to give services externally through reachable URLs, load balance traffic, or by offering name-based virtual hosting. So, Ingress is an API object that manages external access to the services in a cluster, usually by HTTP and is the most powerful way of exposing service.

Now, let me explain to you the working of Ingress network with an example.

There are 2 nodes having the pod and root network namespaces with a Linux bridge. In addition to this, there is also a new virtual ethernet device called flannel0(network plugin) added to the root network.

Now, suppose we want the packet to flow from pod1 to pod 4.

  • So, the packet leaves pod1’s network at eth0 and enters the root network at veth0.
  • Then it is passed on to cbr0, which makes the ARP request to find the destination and it is found out that nobody on this node has the destination IP address.
  • So, the bridge sends the packet to flannel0 as the node’s route table is configured with flannel0.
  • Now, the flannel daemon talks to the API server of Kubernetes to know all the pod IPs and their respective nodes to create mappings for pods IPs to node IPs.
  • The network plugin wraps this packet in a UDP packet with extra headers changing the source and destination IP’s to their respective nodes and sends this packet out via eth0.
  • Now, since the route table already knows how to route traffic between nodes, it sends the packet to the destination node2.
  • The packet arrives at eth0 of node2 and goes back to flannel0 to de-capsulate and emits it back in the root network namespace.
  • Again, the packet is forwarded to the Linux bridge to make an ARP request to find out the IP that belongs to veth1.
  • The packet finally crosses the root network and reaches the destination Pod4.

Related questions

0 votes
asked May 23, 2021 in Kubernetes K8s by sharadyadav1986
0 votes
asked Sep 29, 2022 in Kubernetes K8s by SakshiSharma
...