after deploying nginx ingress controller there are two services in the nginx namespace
NAME TYPE CLUSTER-IP EXTERNAL-IP
ingress-nginx-controller LoadBalancer 10.28.13.78
ingress-nginx-controller-admission ClusterIP 10.28.8.39
I understand the external ip maps to the external load balancer that routes traffic to ingress, but what is the functionality of this ClusterIP ?
Does this clusterIP routes traffic to application services, and then application pods?
2
Answers
It relates to the admission webhook. Here is reference to the documentation:
ClusterIP
type service abstraction is also doing a load balancing but cluster internal. It’s not some running instance as a load balancer you already know.kube-proxy
configuresip-tables
rules for each pod fronted by thisClusterIP
service and randomly routes traffic to different pods (as the same TCP session packets will directed to the same pod otherwise pods will end up not being able to decode meaningful data).No, That’s not right. To send traffic from Ingress to application pods it uses a
ClusterIP
of the application service. Here you also get aClusterIP
when creating aLoadBalancer
type service by default. It is for convenience as to not use external IP for internal service to Ingress communication that you may want.