Kubernetes吊舱陷入“待定”状态

时间:2020-11-12 11:24:57

标签: kubernetes

突然,我想将hostPath挂载更改为我制作的新glusterFS挂载。当我删除挂载时,这些部署的pod总是这样,我会附加一些输出:

kubectl describe pod [podname]
-->
Name:           otpnxus-5b4b974b65-7s5sb
Namespace:      ouapi
Priority:       0
Node:           node2/
Labels:         app=otpnexus
                pod-template-hash=5b4b974b65
Annotations:    <none>
Status:         Pending
IP:
IPs:            <none>
Controlled By:  ReplicaSet/otpxus-5b4b974b65
Containers:
  otpnexus:
    Image:      dockerhub.privaterep.com
    Port:       <none>
    Host Port:  <none>
    Command:
      otp
    Args:
      --server
      --autoScan
      --insecure
      --verbose
    Environment:  <none>
    Mounts:
      /var/otp/graphs from volum-otp (rw)
      /var/run/secrets/kubernetes.io/serviceaccount from default-token-nm479 (ro)
Conditions:
  Type           Status
  PodScheduled   True
Volumes:
  volum-otp:
    Type:          HostPath (bare host directory volume)
    Path:          /usr/nexus/dades_otp/graphs/
    HostPathType:
  default-token-nm479:
    Type:        Secret (a volume populated by a Secret)
    SecretName:  default-token-nm479
    Optional:    false
QoS Class:       BestEffort
Node-Selectors:  <none>
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  6m18s  default-scheduler  Successfully assigned sapi/otpxus-5b4b974b65-7s5sb to node2

和日志不可用:

 kubectl logs otpnexus-5b4b974b65-7s5sb
Error from server (NotFound): the server could not find the requested resource ( pods/log otpxus-5b4b974b65-7s5sb)

我该怎么办?

1 个答案:

答案 0 :(得分:-1)

您可以尝试直接在Docker中从Image: 1运行映像。使用上面提到的命令和参数,那么您应该能够看到一些日志行。