How Does Ingress Interact with Services and Pods in Kubernetes?

0
8
Asked By TechSavvyDude42 On

Hey everyone,

I'm working on some network diagrams for my Kubernetes cluster and something caught my attention in the Ingress logs. I see direct calls to the pod CIDR (10.244.0.0/16) rather than expected calls to a service that would correspond to the service CIDR (192.168.0.0/16). Is this the normal behavior for Ingress? Am I missing something here? Could it be that KubeDNS is somehow resolving the service call straight to the pod IPs?

4 Answers

Answered By TechSavvyDude42 On
Answered By NetGuru99 On

From what I know, Ingress indeed checks for services first. Behind each service, there are endpoints that track the pod IPs, directing traffic to those healthy IPs. So what you're seeing seems to line up with how it's supposed to work.

Answered By KubeMasterX On

The behavior you see can depend on the ingress controller's configuration. For example, the nginx ingress controller typically uses Kubernetes services to find pod IPs behind them, and it connects directly from the Ingress to the pods. However, this can also be altered in the config. Just so you know, if you're using Azure Kubernetes Service, they've stated that they will support NGINX Ingress until November 2026.

Answered By CloudNinja85 On

Service IPs actually act as virtual IPs. Kube-proxy does some destination NAT to route traffic from those virtual IPs to the actual pod IPs. It sounds like everything is functioning as expected on your end!

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.