没有部署任何其他 pod。我有 2 个节点,但 Pod 为零。它是一个t3.small实例类型。
是否还有其他命令可以调试并查看为什么它仍然停留在挂起状态?
kubectl get pods
NAME READY STATUS RESTARTS AGE
mysql-6cc489dcd5-5jc8t 0/1 Pending 0 91s
kubectl describe pod mysql-6cc489dcd5-5jc8t
Name: mysql-6cc489dcd5-5jc8t
Namespace: default
Priority: 0
Node: <none>
Labels: app=mysql
pod-template-hash=6cc489dcd5
Annotations: kubernetes.io/psp: eks.privileged
Status: Pending
IP:
IPs: <none>
Controlled By: ReplicaSet/mysql-6cc489dcd5
Containers:
mysql:
Image: mysql:5.6
Port: 3306/TCP
Host Port: 0/TCP
Environment:
MYSQL_ROOT_PASSWORD: dbpassword11
Mounts:
/docker-entrypoint-initdb.d from usermanagement-dbcreation-script (rw)
/var/lib/mysql from mysql-persistent-storage (rw)
/var/run/secrets/kubernetes.io/serviceaccount from default-token-nlx4p (ro)
Volumes:
mysql-persistent-storage:
Type: PersistentVolumeClaim (a reference to …Run Code Online (Sandbox Code Playgroud) t2.micro根据本文和命令kubectl get nodes -o yaml | grep pods输出,每个节点应该能够运行 4 个 pod 。
但是我有两个节点,我只能启动 2 个 pod。第三个吊舱卡住了以下错误消息。
可能是应用程序使用了太多资源而导致它没有启动更多的 pod?如果是这种情况,它可以表明Insufficient CPU or memory.
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Warning FailedScheduling 33s (x2 over 33s) default-scheduler 0/2 nodes are available: 2 Too many pods.
Run Code Online (Sandbox Code Playgroud)