How does Kubernetes does ensure dynamic deployment ? how can it change the data path?

4/8/2019

For the first part of the question, I want to know how k8s may deploy a new pod dynamically and make it functional.

For the second part, let's suppose that we have two pods (A and B) that communicate together, so if we deploy a new pod (let C) How can Kubernetes change the datapath by forcing A and B to communicate via C?

I'll be so thankful for any suggestion.

-- Smaillns
deployment
dynamic
kubernetes
networking

1 Answer

4/8/2019

I want to know how k8s may deploy a new pod dynamically and make it functional.

Generally, through a workload controller like a Deployment, DaemonSet, StatefulSet, etc.

let's suppose that we have two pods (A and B) that communicate together, so if we deploy a new pod (let C) How can Kubernetes change the datapath by forcing A and B to communicate via C?

Generally, it's done through service discovery with DNS. There are other alternatives like using something like Consul which can also use DNS and/or it has its own catalog

-- Rico
Source: StackOverflow