我有一个运行版本1.28的EKS集群,在那里我遇到了与php-fpm pod相关的问题。
我的pod即使在容器成功启动并生成日志后,仍处于“容器创建”状态。
Name: api-test-php-5965d59686-ldd7s
Namespace: api-test-producao
Priority: 0
Service Account: default
Node: ip-172-81-11-245.sa-east-1.compute.internal/172.81.11.245
Start Time: Mon, 09 Oct 2023 17:37:06 -0300
Labels: app=api-test-php
pod-template-hash=5965d59686
Annotations: co.elastic.logs/enabled: true
Status: Pending
IP:
IPs: <none>
Controlled By: ReplicaSet/api-test-php-5965d59686
Containers:
api-test-php:
Container ID:
Image: ***********.dkr.ecr.sa-east-1.amazonaws.com/api-test:php-90
Image ID:
Port: 9000/TCP
Host Port: 0/TCP
State: Waiting
Reason: ContainerCreating
Ready: False
Restart Count: 0
Limits:
cpu: 800m
memory: 256Mi
Requests:
cpu: 500m
memory: 128Mi
Environment Variables from:
api-test-php ConfigMap Optional: false
Environment: <none>
Mounts:
/var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-kl7xj (ro)
Conditions:
Type Status
Initialized True
Ready False
ContainersReady False
PodScheduled True
Volumes:
kube-api-access-kl7xj:
Type: Projected (a volume that contains injected data from multiple sources)
TokenExpirationSeconds: 3607
ConfigMapName: kube-root-ca.crt
ConfigMapOptional: <nil>
DownwardAPI: true
QoS Class: Burstable
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 44s default-scheduler Successfully assigned api-test-producao/api-test-php-5965d59686-ldd7s to ip-172-81-11-245.sa-east-1.compute.internal
Normal Pulling 43s kubelet Pulling image "814635504079.dkr.ecr.sa-east-1.amazonaws.com/api-test:php-90"
Normal Pulled 35s kubelet Successfully pulled image "814635504079.dkr.ecr.sa-east-1.amazonaws.com/api-test:php-90" in 7.74s (7.74s including waiting)
Normal Created 35s kubelet Created container api-test-php
Normal Started 35s kubelet Started container api-test-php
有没有人以前遇到过这种情况,或者可以帮助识别错误?
我试过很多方法。唯一有效的方法是使用Docker Hub中的干净镜像,更改从中提取镜像的存储库。
1条答案
按热度按时间qltillow1#
我找到解决办法了。
在我的部署中,我正在创建Laravel日志文件。这些命令在eks 1.21上运行良好。在eks 1.28中,由于某种原因,我不得不将“sudo”添加到“tail”命令中。
下面是我的修正和现在的功能部署。谢谢你的帮助