Kubernetes Deployment Strategy with PersistentDisk Volumnet Mounts

8/22/2018

We have a K8s deployment spec which uses a replica count of 1 and the pod contains a GCE PersistentDisk volume mounted with RWOnce.

For context, GCE PD does not allow Multi-Write mounting.

At the moment, we have a Recreate Deployment strategy since that is the only strategy which works for us as it ensures that the volume will be detached when the old pod is destroyed, and successfully attach with the new pod creation.

However, our pod image pulls take a while and thus every deployment takes our site down for a few tens of seconds.

Is there any other deployment strategy that prevents this?

One solution, of course, is to use a VolumeMount that allows multi-write mounting, but that I was wondering if there are other known solutions to this problem.

-- rtindru
gce-persistent-disk
kubernetes
kubernetes-deployment

1 Answer

8/23/2018

As far as I know, using Multi-Write mounting is the only way to minimize downtimes of the deployments.

-- d0bry
Source: StackOverflow