[英]Connect Pods from one cluster to a pod in aother cluster without using k8s service
We have two k8s clusters: 我们有两个k8s集群:
Cluster details: 群集详细信息:
Cluster 1:
Pod Network: 172.16.1.0/24
Node Network: 172.16.2.0/24
Cluster 2:
Pod Network: 172.16.3.0/24
Node Network: 172.16.4.0/24
All these networks are connectivity to one another. 所有这些网络都是相互连接的。
Suppose we have 3 pods in each clusters 假设每个群集中有3个Pod
Cluster1-Pod1: IP: 172.16.1.1
Cluster1-Pod2: IP: 172.16.1.2
Cluster1-Pod3: IP: 172.16.1.3
Cluster2-Pod1: IP: 172.16.3.1
Cluster2-Pod2: IP: 172.16.3.2
Cluster2-Pod3: IP: 172.16.3.3
How can one access the apps of pods in cluster2
from cluster1
without creating a k8s
service using Pod IP or hostname
. 如何使用k8s
IP或hostname
从cluster1
访问cluster2
中cluster2
的应用程序而不创建k8s
服务。 Any solution available to publish/advertise pods IP/hostname
from one cluster to another? 有什么解决方案可以将Pod IP/hostname
从一个群集发布/广告到另一个群集? If creating a service is mandatory, any options to achieve it without Type: LoadBlanacer or Ingress? 如果必须创建服务,那么没有类型的任何选项都可以实现:LoadBlanacer或Ingress?
Appreciate any inputs. 感谢任何输入。
Are you sure you are not confusing nodes with clusters? 您确定不会将节点与群集混淆吗? Because if these pods exist on different nodes, within the same cluster, then you can simply access the pod with its IP. 因为如果这些Pod存在于同一群集中的不同节点上,那么您可以简单地使用其IP访问Pod。
Otherwise, it is not possible to connect to your pod outside the cluster without making your pod public by a service(NodePort, LoadBalancer) or Ingress. 否则,如果不通过服务(NodePort,LoadBalancer)或Ingress将Pod公开,则无法连接到集群外部的Pod。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.