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!

Enroll Now

what is service:

*normally service is used to balance traffic among pods in a cluster .this can be done with the help of load balancer

*enables network access from either within the cluster or between external processes and the service.

TYPES OF SERVICE:

ClusterIP :only accessible from within the cluster

NodePort:expose via a port on each node IP’s and can be accessed from outside

LoadBalancer:via cloud

ExternalName:map to predefined namefield

Use Of Service named Kubernetes in default Namespace:

*Used to forward the request to the master(APIServer) So all the requests to the Kubernetes default service from the cluster will be routed to the configured Endpoint IP.

service work process:

That has proxy to be configured to forward to the resources

create a service

describe the service and you can see there is no endpoint

Inorder to enable endpoint: edit in a way that label selector at the load balancer should match the label selector of the pod

then you can see endpoints.