Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is an 'endpoint' in Kubernetes?

I am new to Kubernetes and started reading through the documentation. There often the term 'endpoint' is used but the documentation lacks an explicit definition.

What is an 'endpoint' in terms of Kubernetes? Where is it located?

I could image the 'endpoint' is some kind of access point for an individual 'node' but that's just a guess.

like image 745
Chris Avatar asked Oct 17 '18 14:10

Chris


People also ask

How endpoints are created in Kubernetes?

When Kubernetes processes a service description, and if the service selector matches a pod label, Kubernetes will automatically create an Endpoints object with the same name as the service, which stores the pod's IP address and port.

How do you expose endpoints in Kubernetes?

From the Service type drop-down list, select Node port. Click Expose. When your Service is ready, the Service details page opens, and you can see details about your Service. Under Ports, make a note of the Node Port that Kubernetes assigned to your Service.

What is a collection of pods that is exposed as an endpoint?

As mentioned previously, a Service is backed by a group of Pods. These Pods are exposed through endpoints . The Service's selector will be evaluated continuously and the results will be POSTed to an Endpoints object also named my-nginx .


1 Answers

While you're correct that in the glossary there's indeed no entry for endpoint, it is a well defined Kubernetes network concept or abstraction. Since it's of secondary nature, you'd usually not directly manipulate it. There's a core resource Endpoint defined and it's also supported on the command line:

$ kubectl get endpoints NAME         ENDPOINTS            AGE kubernetes   192.168.64.13:8443   10d 

And there you see what it effectively is: an IP address and a port. Usually, you'd let a service manage endpoints (one EP per pod the service routes traffic to) but you can also manually manage them if you have a use case that requires it.

like image 88
Michael Hausenblas Avatar answered Oct 02 '22 02:10

Michael Hausenblas