Service
A Kubernetes Service is an abstract way to expose an application running on a set of Pods as a network service. With the help of selectors, it locates and targets Pod instances. Services enable various features that allow users to deploy applications while maintaining load and ensuring availability. For detailed information, refer to the official Kubernetes documentation on Services.
Terraform Mappings:
kubernetes_service.metadata[0].name
kubernetes_service_v1.metadata[0].name
Supported Methods​
GET
: Get a Service by nameLIST
: List all ServicesSEARCH
: Search for a Service using the ListOptions JSON format e.g. ("labelSelector": "app=wordpress")
Possible Links​
Pod
​
A Service is related to Pods as it routes traffic to the pods that match the selectors specified in the Service definition. It enables stable and reliable communication with the Pods, managing their lifecycle and scaling requirements efficiently.
ip
​
A Service is assigned an IP address, which is used by clients to connect to the set of Pods behind the Service. This IP address helps in abstracting the Pod IPs, which may change, thus providing a stable endpoint for accessing applications.
dns
​
Kubernetes Services automatically register a DNS name within the cluster, making services accessible to other components without needing to know their IP addresses. This DNS naming ensures reliable service discovery and simplifies service communication within the Kubernetes environment.