简体   繁体   English

kubernetes pod 的非本地通信

[英]Nonlocal communication of kubernetes pods

  • This is more of a conceptual question and I could not find any information on the web or the documentation.这更像是一个概念性问题,我找不到有关 web 或文档的任何信息。 I am trying to learn about the networking of kubernetes, so my question is more focuses on the conceptual part and not on the convention of deploying applications.我正在尝试了解 kubernetes 的网络,所以我的问题更多地集中在概念部分而不是部署应用程序的约定上。 From what I learnt so far, I can use Minikube to run kubernetes locally but let's say I have a pod running on my computer and another one running on my colleague's computer or in other words a pod running on an external computer on an external network.根据我目前所学到的知识,我可以使用 Minikube 在本地运行 kubernetes 但假设我有一个 pod 在我的计算机上运行,另一个在我同事的计算机上运行,或者换句话说,一个 pod 在外部网络上的外部计算机上运行。 Is there a possible way to make these pods communicate with each other?有没有办法让这些 pod 相互通信? Or the only way I can achieve this is via a cloud service provider?或者我能做到这一点的唯一方法是通过云服务提供商?

  • From what I understand is that, in this scenario, there are two pods in two different clusters and the thing I am trying to achieve is the networking of the clusters ultimately making it possible for pods in these different clusters to communicate with each other.据我了解,在这种情况下,两个不同的集群中有两个 pod,我想要实现的是集群的联网,最终使这些不同集群中的 pod 可以相互通信。

    Thanks in advance.提前致谢。

Is there a possible way to make these pods communicate with each other?有没有办法让这些 pod 相互通信?

They are indeed on different clusters, but networking and nodes are managed outside of Kubernetes.它们确实位于不同的集群上,但网络和节点在 Kubernetes 之外进行管理。 Depending on how you configure your networking (eg routing and subnets) this is possible.根据您配置网络的方式(例如路由和子网),这是可能的。 You can eg install Kubernetes on nodes that are public on Internet - and also install Kubernetes within a Company Network - it is common that Companies that setup Kubernetes (eg OpenShift) locally also let the services communicate with other non-Kubernetes services eg databases outside of the cluster - that is no different from another Kubernetes cluster.例如,您可以在 Internet 上的公共节点上安装 Kubernetes - 并且还可以在公司网络内安装 Kubernetes - 通常设置 Z30136395F01879792198317C11831EA4 的公司在本地与其他非 Kubernetes 服务进行通信,例如数据库集群 - 这与另一个 Kubernetes 集群没有什么不同。 It all depends on how you configure your networking - and that is independent of Kubernetes.这完全取决于您如何配置网络 - 这与 Kubernetes 无关。

You can also expose services in a cluster to the external world by creating LoadBalancers or Proxies that are reachable from other networks.您还可以通过创建可从其他网络访问的 LoadBalancers 或代理向外部世界公开集群中的服务。 This is the typical way Kubernetes is setup, with cluster local nodes.这是 Kubernetes 设置的典型方式,具有集群本地节点。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM