Is there any wayto run bash script from one pod or init container to another pod? Is there any wayto run bash script from one pod or init container to another pod? kubernetes kubernetes

Is there any wayto run bash script from one pod or init container to another pod?


You can't directly run scripts or other code in other pods. You need to make network calls to cause things to happen. The use case you describe sounds a little unusual, and a better way to do it might be to use the Kubernetes API in service A to watch for B pods, or to query the Service object for B to find out what pods are present when you need to know that.