请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

kubectl apply -f pod.yaml 这个pod没有正常启动

Containers:
web-server:
Container ID:
Image: nginx
Image ID:
Port:
Host Port:
State: Waiting
Reason: ContainerCreating
Ready: False
Restart Count: 0
Environment:
Mounts:
/var/lib/www/html from mypvc (rw)
/var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-2svff (ro)
Conditions:
Type Status
Initialized True
Ready False
ContainersReady False
PodScheduled True
Volumes:
mypvc:
Type: PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
ClaimName: rbd-pvc
ReadOnly: false
kube-api-access-2svff:
Type: Projected (a volume that contains injected data from multiple sources)
TokenExpirationSeconds: 3607
ConfigMapName: kube-root-ca.crt
ConfigMapOptional:
DownwardAPI: true
QoS Class: BestEffort
Node-Selectors:
Tolerations: node.kubernetes.io/not-ready:NoExecute op=Exists for 300s
node.kubernetes.io/unreachable:NoExecute op=Exists for 300s
Events:
Type Reason Age From Message


Normal Scheduled 8m49s default-scheduler Successfully assigned default/csi-rbd-demo-pod to node1.sky.com
Normal SuccessfulAttachVolume 8m48s attachdetach-controller AttachVolume.Attach succeeded for volume "pvc-4b89b52e-fba1-4aff-84de-c881c5661029"
Warning FailedMount 2m13s (x3 over 6m46s) kubelet Unable to attach or mount volumes: unmounted volumes=[mypvc], unattached volumes=[mypvc kube-api-access-2svff]: timed out waiting for the condition
Warning FailedMount 32s (x12 over 8m47s) kubelet MountVolume.MountDevice failed for volume “pvc-4b89b52e-fba1-4aff-84de-c881c5661029” : rpc error: code = Internal desc = unsupported krbd Feature
[root@master rbd]#
[root@master rbd]# kubectl get pods csi-rbd-demo-pod
NAME READY STATUS RESTARTS AGE
csi-rbd-demo-pod 0/1 ContainerCreating 0 8m51s

这个pod一直处于 ContainerCreating 状态,像这种情况怎么处理

图片描述

正在回答 回答被采纳积分+3

1回答

Cap 2022-12-21 15:53:58

这里的报错非常明显是存储在创建的时候无法与这个pod关联起来导致的pod无法启动。

0 回复 有任何疑惑可以回复我~
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信