Pod will be in a ContainerCreating state with Multi-Attach error for volume when using kubernetes.io/vsphere-volume as the provisioner in Enterprise PKS
book
Article ID: 316799
calendar_today
Updated On:
Products
VMware Cloud PKS
Issue/Introduction
Symptoms:
One of the pods in a replicaset will be running and other pod will be in a containerCreating state.
You see errors similar to following when running kubectl describe pod <pod name> on the problematic pod:
Multi-Attach error for volume "pvc-XXXXX" Volume is already used by pod
Unable to mount volumes for pod
Environment
VMware PKS 1.x
Resolution
You must manually add labels on the nodes and use node selectors in the deployment in such a way that pods get scheduled on the same node. Assigning Pods to Nodes provides detailed instructions for completing this task.
Additional Information
In PKS the node labels are not persistent. Whenever the node gets recreated the labels will be lost and must be manually recreated.