gpt4 book ai didi

docker - Kubernetes Pod处于待处理状态

转载 作者:行者123 更新时间:2023-12-02 21:09:58 25 4
gpt4 key购买 nike

我正在尝试安装Kubectl,但是当我在终端中输入以下内容时:

kubectl get pods --namespace knative-serving -w

我懂了 :
NAME                          READY     STATUS    RESTARTS   AGE
activator-69b8474d6b-jvzvs 2/2 Running 0 2h
autoscaler-6579b57774-cgmm9 2/2 Running 0 2h
controller-66cd7d99df-q59kl 0/1 Pending 0 2h
webhook-6d9568d-v4pgk 1/1 Running 0 2h
controller-66cd7d99df-q59kl 0/1 Pending 0 2h
controller-66cd7d99df-q59kl 0/1 Pending 0 2h
controller-66cd7d99df-q59kl 0/1 Pending 0 2h
controller-66cd7d99df-q59kl 0/1 Pending 0 2h
controller-66cd7d99df-q59kl 0/1 Pending 0 2h
controller-66cd7d99df-q59kl 0/1 Pending 0 2h

我不明白为什么 controller-66cd7d99df-q59kl仍在等待处理。

当我尝试这个: kubectl describe pods -n knative-serving controller-66cd7d99df-q59kl我得到了这个:
Name:           controller-66cd7d99df-q59kl
Namespace: knative-serving
Node: <none>
Labels: app=controller
pod-template-hash=66cd7d99df
Annotations: sidecar.istio.io/inject=false
Status: Pending
IP:
Controlled By: ReplicaSet/controller-66cd7d99df
Containers:
controller:
Image: gcr.io/knative-releases/github.com/knative/serving/cmd/controller@sha256:5a5a0d5fffe839c99fc8f18ba028375467fdcd83cbee9c7015c1a58d01ca6929
Port: 9090/TCP
Limits:
cpu: 1
memory: 1000Mi
Requests:
cpu: 100m
memory: 100Mi
Environment: <none>
Mounts:
/etc/config-logging from config-logging (rw)
/var/run/secrets/kubernetes.io/serviceaccount from controller-token-d9l64 (ro)
Conditions:
Type Status
PodScheduled False
Volumes:
config-logging:
Type: ConfigMap (a volume populated by a ConfigMap)
Name: config-logging
Optional: false
controller-token-d9l64:
Type: Secret (a volume populated by a Secret)
SecretName: controller-token-d9l64
Optional: false
QoS Class: Burstable
Node-Selectors: <none>
Tolerations: node.kubernetes.io/not-ready:NoExecute for 300s
node.kubernetes.io/unreachable:NoExecute for 300s
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Warning FailedScheduling 40s (x98 over 2h) default-scheduler 0/1 nodes are available: 1 Insufficient cpu.

最佳答案

请考虑以上评论:您已正确安装kubectl(正在运行),并且kubectl describe pod/<pod>将有帮助...

但是,您提供的信息似乎足以回答问题:
FailedScheduling,因为Insufficient cpu
您显示的广告连播(几个)之一请求:

cpu:     1
memory: 1000Mi

群集没有足够的能力来部署此Pod(显然还有其他Pod)。

您应该增加群集中节点的数量(和/或大小),以容纳Pod所需的容量。

您无需删除这些容器,因为一旦集群容量增加,您应该会看到这些容器已成功部署。

关于docker - Kubernetes Pod处于待处理状态,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55208598/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com