5
votes

I am using a Kubernetes service, but I am a little confused about the parameter of External IPs in service:

If there are external IPs that route to one or more cluster nodes, Kubernetes services can be exposed on those external IPs. Traffic that ingresses into the cluster with the external IP (as destination IP), on the service port, will be routed to one of the service endpoints. External IPs are not managed by Kubernetes and are the responsibility of the cluster administrator.

I am not sure the difference between the Load Balancer type service and the service which uses External IPs.

I can use service with Load Balancer type, then the service can be load balanced by cloud providers.

But when I use ClusterIP type with External IPs parameter, I can also get the load balance ability.

So what the difference? Why have this External IPs parameter?

1

1 Answers

1
votes

You are right that they are both ways of exposing services externally, and that they will both reach all of the pods connected by the service in question, but the infrastructure that allows it is different.

With a LoadBalancer type, on cloud providers which support external load balancers, one will be provisioned for you. This comes with differences from simply attaching an IP address to a node. Within AWS it will be the difference between provisioning an ELB and attaching a EIP. Those will then imply differences with for example security group controls, encrypted traffic termination and so on.

Another important difference is that while LoadBalancers are provisioned automatically by Kubernetes if you're in a supported cloud environment, External IPs are manually provisioned by you, which might mean more or less flexibility, depending on your setup. Please see the docs for more.