简体   繁体   English

Kubernetes 基本 - 集群 IP

[英]Kubernetes Basic - Cluster IP

I have a basic understanding that pods need to be exposed as service.我对 Pod 需要作为服务公开有一个基本的了解。 Now I would like to know that the frontend Pod(like web pods) must be exposed as Load Balancer service and backend pods (like app or DB pods) must be exposed as ClientIP.现在我想知道前端 Pod(如 web pod)必须公开为负载均衡器服务,后端 pod(如应用程序或数据库 pod)必须公开为 ClientIP。 And there is no configuration from within the application(Java/Python).并且应用程序(Java/Python)中没有配置。 My question may be silly but I would like to understand.我的问题可能很愚蠢,但我想了解。 In a Two-tier or three tier architecture we will be configuring in the application side.在两层或三层架构中,我们将在应用程序端进行配置。 Likewise I am trying to understand the concept here.同样,我试图在这里理解这个概念。 Thanks in advance!提前致谢!

To establish the communication between component (frontend, backend and database) I think you need to make:要建立组件(前端、后端和数据库)之间的通信,我认为您需要:

  • A deployment for each component每个组件的部署
  • Service type clusterIp to establish communication between backend and database.服务类型 clusterIp 用于在后端和数据库之间建立通信。
  • Service type clusterIP to establish communication between backend and frontend.服务类型 clusterIP 用于建立后端和前端之间的通信。
  • To make your application accessible from the outside you can use service type nodePort or load balancer.要使您的应用程序可以从外部访问,您可以使用服务类型 nodePort 或负载均衡器。

To resume:恢复:

  • Service type clusterIP for inter communication inside cluster.服务类型 clusterIP 用于集群内部的相互通信。
  • Node port to make your service accessible at node level.节点端口,使您的服务在节点级别可访问。 I hope that make this part clear for you.我希望这部分能让你清楚。

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

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