1

Pod 状态始终处于挂起状态。我在本地使用 Kind 来研究 Kubernetes 并尝试上一个 Pod。

❯ kubectl get pods             
NAME       READY   STATUS    RESTARTS   AGE
goserver   0/1     Pending   0          12m

来自描述的事件是没有的。

❯ kubectl describe pod goserver
Name:         goserver
Namespace:    default
Priority:     0
Node:         <none>
Labels:       app=goserver
Annotations:  <none>
Status:       Pending
IP:           
IPs:          <none>
Containers:
  goserver:
    Image:        allansduarte/hellogo
    Port:         <none>
    Host Port:    <none>
    Environment:  <none>
    Mounts:
      /var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-rjkmz (ro)
Volumes:
  kube-api-access-rjkmz:
    Type:                    Projected (a volume that contains injected data from multiple sources)
    TokenExpirationSeconds:  3607
    ConfigMapName:           kube-root-ca.crt
    ConfigMapOptional:       <nil>
    DownwardAPI:             true
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:                      <none>

没有日志。

❯ kubectl logs goserver

Kubernetes 系统日志。

❯ kubectl get pod -n kube-system
NAME                                              READY   STATUS    RESTARTS   AGE
coredns-558bd4d5db-62bbj                          1/1     Running   5          10d
coredns-558bd4d5db-zk9rw                          1/1     Running   5          10d
etcd-fullcycle-control-plane                      1/1     Running   0          95m
kindnet-66c9q                                     1/1     Running   5          10d
kindnet-6wfzg                                     1/1     Running   5          10d
kindnet-sklzj                                     1/1     Running   5          10d
kindnet-xjh4p                                     1/1     Running   5          10d
kube-apiserver-fullcycle-control-plane            1/1     Running   0          95m
kube-controller-manager-fullcycle-control-plane   1/1     Running   8          10d
kube-proxy-cdzrj                                  1/1     Running   5          10d
kube-proxy-jphsn                                  1/1     Running   5          10d
kube-proxy-mhdtt                                  1/1     Running   5          10d
kube-proxy-x8jbm                                  1/1     Running   5          10d
kube-scheduler-fullcycle-control-plane            1/1     Running   8          10d

有什么继续调查的建议吗?

4

1 回答 1

0

我最近切换到 Mac OS Big Sur 并且 Kubernetes 和 Docker 没有启动。然后,我只需重新安装 Docker 和 Kubernetes。重置 Kubernetes、清理/清除数据或重置为出厂默认值的选项不起作用。

于 2021-09-03T21:25:20.017 回答