Kubernetes 中的“端点"是什么? [英] What is an 'endpoint' in Kubernetes?

查看:27
本文介绍了Kubernetes 中的“端点"是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 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.

推荐答案

虽然您在 glossary 确实没有端点的条目,它是一个定义明确的 Kubernetes 网络概念或抽象.由于它是次要的,您通常不会直接操作它.有一个核心资源 Endpoint已定义,并且在命令行上也受支持:

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

在那里您可以看到它的实际含义: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 中的“端点"是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆