title: Difference between NodePort and LoadBalancer?
body: <p>I have just started with Kubernetes and I am confused about the difference between NodePort and LoadBalancer type of service.</p>
  <p>The difference I understand is that LoadBalancer does not support UDP but apart from that whenever we create a service either <code>Nodeport</code> or <code>Loadbalancer</code> we get a service IP and port, a NodePort, and endpoints.</p>
  <p>From Kubernetes docs:</p>
  <blockquote>
  <p><strong>NodePort:</strong> on top of having a cluster-internal IP, expose the service
  on a port on each node of the cluster (the same port on each node).
  You'll be able to contact the service on any <em><strong>NodeIP:NodePort</strong></em>
  address.</p>
  </blockquote>
  <blockquote>
  <p><strong>LoadBalancer:</strong> on top of having a cluster-internal IP and
  exposing service on a NodePort also, ask the cloud provider for a load
  balancer which forwards to the Service exposed as a <em><strong>NodeIP:NodePort</strong></em>
  for each Node.</p>
  </blockquote>
  <p>So, I will always access service on NodeIP:NodePort.
  My understanding is, whenever we access the node:NodePort, the kubeproxy will intercept the request and forward it to the respective pod.</p>
  <p>The other thing mentioned about LoadBalancer is that we can have an external LB which will LB between the Nodes. What prevents us to put a LB for services created as nodeport?</p>
  <p>I am really confused. Most of the docs or tutorials talk only about LoadBalancer service therefore I couldn't find much on internet.</p>