Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在入口后面公开服务的正确方法是什么。我应该使用 nodePort 吗?集群IP?别的东西?因为大多数教程都忽略了这一点。有些人使用 nodePort 显示服务,然后添加诸如“对于这个演示就足够了”之类的东西,这不是很让人放心。
入口后面的服务可能只是 ClusterIP。您需要 NodePort 的唯一原因是如果您有一些外部 LoadBalancer 或者您需要一个静态端口,您可以在该端口上访问集群内的服务。由于入口路由集群内的流量,您可以只使用 ClusterIP。