<p>I'm now using kubernetes to run the Docker container.I just create the container and i use SSH connect to my pods. </p>

<p>I need to do some system config change so i need to reboot the container but when i`reboot the container it will lose all the data in the pod. kubernetes  will run a new pod just like the Docker image original.</p>

<p>So how can i reboot the pod and just keep the data in it?</p>

<p>The kubernetes  was offered my Bluemix</p>

<p>You need to learn more about containers as your question suggests that you are not fully grasping the concepts.</p>

<ol>
<li>Running SSH in a container is an anti-pattern, a container is not a virtual machine. So remove the SSH server from it.</li>
<li>the fact that you run SSH indicates that you may be running more than one process per container. This is usually bad practice. So remove that supervisor and call your main process directly in your entrypoint.</li>
<li>Setup your container image main process to use environment variables or configuration files for configuration at runtime.</li>
</ol>

<p>The last item means that you can define environment variables in your Pod manifest or use Kubernetes configmaps to store configuration file. Your Pod will read those and your process in your container will get configured properly. If not your Pod will die or your process will not run properly and you can just edit the environment variable or config map.</p>

<p>My main suggestion here is to not use Kubernetes until you have your docker image properly written and your configuration thought through, you should not have to exec in the container to get your process running.</p>

<p>Finally, more generally, you should not keep state inside a container.</p>
