<p>I'm currently building a Kubernetes cluster. I plan on using Nginx containers as a server for static content, and to act as a web socket proxy. If you restart Nginx, you lose your web socket connection, so I do not want to restart the containers. But I will want to update the content within the container.</p>

<p>I do that same exact thing in my Kubernetes cluster.  Our solution is for application to handle the web socket disconnect with consistent state kept intact.  </p>

<p>However, other options you have are mount a volume to serve from the host; however, you cannot guarantee all nginx pods will have that volume on multi hosts, unless you use a kubernetes' persistent volume <a href="http://kubernetes.io/v1.1/docs/user-guide/persistent-volumes.html" rel="nofollow">http://kubernetes.io/v1.1/docs/user-guide/persistent-volumes.html</a>.  </p>

<p>Another option you have is to have your static content on an object store like S3, Google Cloud Storage or Ceph, and then proxy the object store through nginx along with the websocket.</p>
