Why ‘kubernetes’ service ?


kubectl describe svc kubernetes

Name:              kubernetes
Namespace:         default
Labels:            component=apiserver
Annotations:       <none>
Selector:          <none>
Type:              ClusterIP
IP Family Policy:  SingleStack
IP Families:       IPv4
Port:              https  443/TCP
TargetPort:        6443/TCP
Session Affinity:  None
Events:            <none>
  1. ‘kubernetes’ is a clusterIP service. (ie can be accessed only inside the cluster.)
  2. It has no selector specified.( So no automatic LB.)
  3. But endpoints specified(maybe hardcoded) as ( that means all the requests to this service will be routed to
  4. Now you can see the its the IP and port corresponding to APIServer pod.


So kubernetes service act as a service for APIServer Pod.

Other pods inside the cluster like Scheduler, Controller etc, can use this service to communicate with APIServer pod.