Hello,
I’ve just deployed a new kubernetes cluster on openstack.
pods without volume are running perfectly. But when I create a pod that uses a volume, it stuck in ContainerCreating status.
When I describe the pod, I see :
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 13m default-scheduler Successfully assigned tst/pod-with-block-volume to worker2
Normal SuccessfulAttachVolume 13m attachdetach-controller AttachVolume.Attach succeeded for volume "<pvc-ID>"
Warning FailedMount 3m43s kubelet, worker2 MountVolume.WaitForAttach failed for volume "<pvc-ID>" : could not find attached Cinder disk "<pv-ID>". Timeout waiting for mount paths to be created
Warning FailedMount 2m41s (x4 over 9m31s) kubelet, worker2 Unable to attach or mount volumes: unmounted volumes=[data], unattached volumes=[default-token-vwn8b data]: timed out waiting for the condition
In openstack console I can see the the volume is properly created and it’s mounted to /dev/sdc.
Did I miss something ?
pvc.yaml
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: swagger
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 2Gi
status: {}
pod.yaml
apiVersion: v1
kind: Pod
metadata:
name: pod-with-block-volume
spec:
containers:
- name: fc-container
image: nginx:latest
command: ["/bin/sh", "-c"]
args: [ "tail -f /dev/null" ]
volumeMounts:
- name: data
mountPath: /toto
volumes:
- name: data
persistentVolumeClaim:
claimName: swagger
storageClass.yaml
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
annotations:
storageclass.kubernetes.io/is-default-class: "true"
name: standard
parameters:
availability: nova
provisioner: kubernetes.io/cinder
reclaimPolicy: Delete
Cluster information:
Kubernetes version: v1.18.8
Cloud being used: OVH public cloud (openstack)
Installation method: kubespray
Host OS: Ubuntu 18.04.5 LTS
CNI and version: weave 0.3.0
CRI and version: containerd://1.2.13