K8S Services

Service is used to expose PODS

We have 3 types of services in K8S

  1. Cluster IP
  2. Node port
  3. Load Balancer

Cluster IP: 

  • If we want to expose PODs with in the Cluster, then Cluster IP is used
  • POD is short lived object
  • If POD is damanged/deleted/creashed then K8S will replace that with a new POD(self healing)
  • when pod is re-created IP will be changing(It is not recommented to access pods using POD IP)
  • Cluster IP service is used to link all PODS in Single IP
  • Cluser IP is a static IP to access PODS
Node port: 
  • If we want to expose PODs outside the Cluster, then Node port service is used
  • Using node port we can access our app with worker node public 
  • When we use worker node IP to access our POD then all requests will go to same worker node (Burden will be increased on the node)
  • To distribute load to miultiple worker nodes we will use Load Balancer service

Load Balance: 

  • It is used to expose our PODS outside cluster AWS Load balancer
  • When we access load balancer url, requests will be distributed to all pods running in all worker nodes.



Comments

Popular posts from this blog

Monolithic Architecture

Advantages and Disadvantages of Monolithic Architecture

Load Balancers and Load Balancers Algorithms