Work around the issue when PVC is still being held by the old pods from the old deployment's replica set when patching the deployment:
Warning FailedAttachVolume 7m8s attachdetach-controller Multi-Attach error for volume "pvc-dc041109-cb02-11ea-82bf-42010a8001b2" Volume is already used by pod(s) prometheus-server-77bc48c5cb-qh5gp
Warning FailedMount 34s (x3 over 5m7s) kubelet, gke-lingshi-prom-sidecar-default-pool-e7c128e9-btnb Unable to mount volumes for pod "prometheus-server-6df94f65d5-wjbkf_prometheus(e23e0c7c-cb02-11ea-82bf-42010a8001b2)": timeout expired waiting for volumes to attach or mount for pod "prometheus"/"prometheus-server-6df94f65d5-wjbkf". list of unmounted
volumes=[storage-volume]. list of unattached volumes=[config-volume storage-volume prometheus-server-token-8s9mr]
Another option is to set .spec.revisionHistoryLimit to 0 for this deployment so that orphaned replica set gets deleted right away, but I feel like that is a bit too aggressive. Open to other suggestions as well.
Work around the issue when PVC is still being held by the old pods from the old deployment's replica set when patching the deployment:
Another option is to set
.spec.revisionHistoryLimit
to 0 for this deployment so that orphaned replica set gets deleted right away, but I feel like that is a bit too aggressive. Open to other suggestions as well.