<p>I have a grpc micro-service A running in kubernetes cluster. When this service is called, I would like to create an instance of another grpc micro-service B and run it in the same cluster. I have the image of the second service included in the container A. Now how can I create and run the micro-service B as another pod in the cluster. </p>

<p>Thanks
Madhu</p>

Madhu
<p>You do not need an image inside, what you need is a kubernetes client that you will use to create deployment/job/pod. Your pod needs a serviceaccount that has RBAC role/clusterrole allowing for creation of what you need. This way you can create a service that on demand interacts with kubernetes api and creates what you want.</p>

<p>All in all, it's a very similar concept to how operators work, so looking at <a href="https://github.com/operator-framework" rel="nofollow noreferrer">https://github.com/operator-framework</a> might provide some usefull insights, but even just launching kubectl inside the pod might be good enough for your needs.</p>
