I have a GKE cluster and this morning I have noticed the error message as below
Multi-Attach error for volume <pvcname> Volume is already exclusively attached to one node and can't be attached to another
I'm trying to understand what could have caused this situation, and I would be grateful if someone could help me identify the cause.
I agree with Mr larsks comment.
The error indicates a PVC is configured for ReadWriteOnce (RWO) access and attempts to be attached to multiple pods simultaneously. It's NOT possible with RWO volumes in Kubernetes, as they are designed for exclusive access by a single pod on a single node.
If you were performing a rolling update of a deployment that uses an RWO PVC, the pods might be attempting to mount the volume before the old pod is fully terminated. This can lead to the new pod encountering the "Multi-Attach" error because the volume is still attached to the old pod.
Review your deployment configuration to see if it uses a rolling update strategy and if the PVC is configured for RWO access.
You may also look at recent events in your Kubernetes cluster using
kubectl get eventsto see if there were any pod scheduling issues or errors related to the PVC in question.