Nonlocal communication of kubernetes pods

4/19/2021
  • This is more of a conceptual question and I could not find any information on the web or the documentation. 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. 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. Is there a possible way to make these pods communicate with each other? 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.

    Thanks in advance.

-- Mark R. Chandar
kubernetes
networking

1 Answer

4/19/2021

Is there a possible way to make these pods communicate with each other?

They are indeed on different clusters, but networking and nodes are managed outside of Kubernetes. Depending on how you configure your networking (e.g. routing and subnets) this is possible. You can e.g. 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 (e.g. OpenShift) locally also let the services communicate with other non-Kubernetes services e.g. databases outside of the cluster - that is no different from another Kubernetes cluster. It all depends on how you configure your networking - and that is independent of Kubernetes.

You can also expose services in a cluster to the external world by creating LoadBalancers or Proxies that are reachable from other networks. This is the typical way Kubernetes is setup, with cluster local nodes.

-- Jonas
Source: StackOverflow