Skip to main content
Unlisted page
This page is unlisted. Search engines will not index it, and only users having a direct link can access it.

Service Spec

Here's the most important attributes:

  1. ports - Array<ServicePort>
  2. selector - Object
    • Route service traffic to pods with label keys and values matching this selector
  3. 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