A Kubernetes service is an abstraction serving a set of pods. The pods that a service defines or represents are selected using label selectors specified in the service spec. A service's label selector expression must be included in a pod's labels for the service to represent the pod. For example, if a service selector expression is "app=hello-world", a pod's labels must include the label "app=hello-world" for the service to route client traffic to the pod. A service is accessed at one or more endpoints provided by the service. The number of endpoints available is equal to the number of pod replicas for a deployment/replication controller. To be able to access a service outside its cluster, the service must be exposed at an external IP address. The ServiceType field defines how a service is exposed. By default a ServiceType is ClusterIP, which exposes the service only within the cluster and not at an external IP. The other ServiceTypes are NodePort and LoadBalancer, which expose the service at an external IP.
CITATION STYLE
Vohra, D. (2017). Using Services. In Kubernetes Management Design Patterns (pp. 153–170). Apress. https://doi.org/10.1007/978-1-4842-2598-1_7
Mendeley helps you to discover research relevant for your work.