[Kubernetes] Services

A Service is an abstraction which defines a logical set of Pods and a policy by which to access them (sometimes this pattern is called a micro-service).

  • A service provides a single point of entry for accessing one or more pods.
    • Pods are ephemeral and may only live a short time. For example, each pod gets its own IP address and you cannot rely on a pod id address staying the same.
  • A service creates endpoints between the service and pods.
  • The set of pods targeted by a service is usually determined by a selector.

Service | Kubernetes

  • The roles of a service
    • abstracts pod IP addresses.
    • works on TCP/UDP (OSI Layer 4). kube-proxy creates a virtual IP for services.
    • relies on labels to associate a service with a pod.
    • provides load balancing among pods.
Continue reading “[Kubernetes] Services”