If I create this pod:
apiVersion: v1
kind: Pod
metadata:
name: dsm-manager
spec:
containers:
- name: dsm-manager
image: ******
imagePullPolicy: Always
command:
- /sbin/init
volumeMounts:
- mountPath: /srv/project/DSMManager/snapshots
name: dsm-snapshot-storage
volumes:
- name: dsm-snapshot-storage
awsElasticBlockStore:
volumeID: aws://us-west-2b/vol-43e44482
fsType: ext4
imagePullSecrets:
- name: dockerregistrykey
It always works, but if I delete it and re-create it it gets stuck with status 'CreatingContainer'. Looking in the events yields:
-Unable to mount volumes for pod "dsm-manager_default": Timeout waiting for volume state
-Error syncing pod, skipping: Timeout waiting for volume state
If I delete the pod and re-create it the same thing happens no matter what I do. However if I attach the volume to some instance and then detach it through the aws cli, then create the pod it works find. I'm wondering if the volume isn't being detached properly. For now I just have this odd work flow of attaching the volume to a random instance then detaching it while updating the container image
Hey, http://stackoverflow.com/questions/32894930/kubernetes-aws-ebs-timeout-waiting-for-volume-state/32960312#32960312 might help you, or at least give you a hint what's wrong :). I'm just struggling with the same.
RépondreSupprimer