问题描述
我是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.
就Kubernetes而言,什么是端点"?它在哪里?
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.
推荐答案
在词汇表确实没有端点的条目,它是定义明确的Kubernetes网络概念或抽象.由于它是次要性质,因此您通常不会直接对其进行操作.有一个定义的核心资源端点并且在命令行上也受支持:
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 ep
NAME ENDPOINTS AGE
kubernetes 192.168.64.13:8443 10d
在那里,您将看到有效的内容:一个IP地址和一个端口.通常,您可以让服务管理端点(服务将流量路由到的每个Pod一个EP),但是您也可以手动管理(如果您有需要的话).
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.
这篇关于Kubernetes中的一个“端点"是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!