Service Spec
Here's the most important attributes:
- ports -
Array<ServicePort> - selector -
Object- Route service traffic to pods with label keys and values matching this selector
- type - [
"ExternalName" | "ClusterIP" | "NodePort" | "LoadBalancer"-string]- determines how the Service is exposed
- defaults to
ClusterIP- which allocates a cluster-internal IP address for load-balancing to endpoints - endpoints are determined by the selector