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 :
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.
Now, if you delete a deployment, then you can re-create the same deployment, with the same name, with no problems.
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.