<p>I have work defined in a file/config with the following format,</p>

<pre><code>config1,resource9
config3,resource21
config5,resource10
</code></pre>

<p>How can I spin individual pods based on the configuration? If I add one more line to the configuration, Kubernetes need to spin one more pod and send the configuration line to that pod. </p>

<p>How to store the configuration in Kubernetes and spin up pods based on the configuration?</p>

Kannaiyan
<p>Take a look at <a href="https://coreos.com/operators/" rel="nofollow noreferrer">Kubernetes Operators</a>. The pattern adds a Kubernetes management layer to an application. Basically you run a kubernetes native app (the operator) that connects to the kubernetes API and takes care of the deployment management for you.</p>

<p>If you are familiar with helm, then a quick way to get started is with <a href="https://github.com/operator-framework/operator-sdk/blob/master/doc/helm/user-guide.md" rel="nofollow noreferrer">the helm example</a>. This example will create a new Nginx deployment for each Custom Resource you create. The Custom Resource contains all the helm values nginx requires for a deployment. </p>

<p>As a first step you could customise the example so that all you need to do is manage the single Custom Resource to deploy or update the app. </p>

<p>If you want to take it further then you may run into some helm limitations pretty quickly, for advanced use cases you can use the go <a href="https://github.com/operator-framework/operator-sdk" rel="nofollow noreferrer">operator-sdk</a> directly. </p>

<p>There are a number of projects operators to browse on <a href="https://operatorhub.io/" rel="nofollow noreferrer">https://operatorhub.io/</a> </p>
