<p>How can one start a service or deployment just by using name of the service or deployment from kubernetes java sdk?
Suppose we have started and stopped the service or deployment once, so whether this can be achieved to just use the same name by which we have done the deployment or deployed the service.
For eg :</p>

<ol>
<li>start a deployment by name nginx-deployment by using yaml file and then delete the deployment.</li>
<li>now try to start the same deployment just by using the name of previous deployment from kubernetes java sdk.</li>
<li>whether this can be achieved or not.</li>
</ol>

abhay_singh
<p>In kubernetes you can't stop a service, then to start it again (like in docker). Once a pod is killed, it will need to be re-created.</p>

<p>Now, if you delete a deployment, then you can re-create the same deployment, with the same name, with no problems.</p>

<p>If you are concerned about the state of the application, you can either use a StatefulSet or map the container content into an external volume. For example into the node.</p>
