Skip to main content

Endpoints

Endpoints in Kubernetes represent the set of network addresses (IPs and ports) for a service. They are used to expose services to the network or connect pod containers. Endpoints are crucial for service discovery and load balancing within a Kubernetes cluster. You can refer to the official Kubernetes documentation for more details on Endpoints here.

Terraform Mappings:

  • kubernetes_endpoints.metadata[0].name
  • kubernetes_endpoints_v1.metadata[0].name

Supported Methods

  • GET: Get an Endpoints by name
  • LIST: List all Endpoints
  • SEARCH: Search for an Endpoints using the ListOptions JSON format e.g. ("labelSelector": "app=wordpress")

Node

Endpoints are related to Nodes in that an Endpoint can reference a network address on a Node where the service is running. This allows traffic to be routed to the correct Node ensuring that services are accessible as needed.

ip

Endpoints are directly associated with IP addresses as they define the network locations of a service's pods. By mapping services to specific IPs, Endpoints help facilitate communication within the cluster as well as with external clients.

Pod

An Endpoint is closely linked to Pods because it specifies the Pods that are targeted by a Service. It dynamically tracks the IP addresses of Pods serving the service, ensuring load balancing across Pods and high availability.