Services In Kubernetes
Limited Time Offer!
For Less Than the Cost of a Starbucks Coffee, Access All DevOpsSchool Videos on YouTube Unlimitedly.
Master DevOps, SRE, DevSecOps Skills!
Services in Kubernetes are logical abstraction for a deployed group of pod in cluster. A service is responsible for exposing an interface to those pods, which enables network access from either within the cluster or between external processes and the service.
Types Of Services In Kubernetes:
ClusterIP – This helps in restricting the service within the cluster it expose the service within the defined kubernetes cluster
NodePort – exposes a services via static port on the deployed node. A ClusterIP service ,to which NodePort service will route automatically created.This service can be accessed from outside the cluster using NodeIP:nodePort
LoadBalancer – it use cloud provides lod balancer. NodePort and ClusterIP services are created automatically to which the external load balancer will route.
ExternalName – Maps a service to a predefined externalName field
Use Of Service named Kubernetes in default Namespace
Kubernetes service in the default namespace is used to forward the request to the Kubernetes master which is basically the API Server. So all the requests to the Kubernetes default service from the cluster will be routed to the configured Endpoint IP.
How does services work in Kubernetes?
A Service is a type of kubernetes resources that causes a proxy to be configured to forward request to set of pods. The set Pods that will receive traffic is determined by the selector, which match labels assigned to the pods when they were created.