【发布时间】:2020-08-01 10:41:41
【问题描述】:
我想在 pod 内部检查图像内部存在的缺陷,但出现以下错误。正如我在描述中验证的那样,容器的名称是正确的。我还能做些什么来获得集群中的连接?
命令:kubectl exec -it -c 气流控制台 -n 气流气流控制台-xxxxxxx-xxxxxx bash
error: unable to upgrade connection: container not found ("airflow-console")
命令:kubectl describe pod/airflow-console-xxxxxxx-xxxxx -n 气流
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 37m default-scheduler Successfully assigned airflow/airflow-console-xxxxxxx-xxxxx to aks-test
Normal Pulling 37m kubelet, aks-test Pulling image "test.azurecr.io/airflow:2"
Normal Pulled 37m kubelet, aks-test Successfully pulled image "test.azurecr.io/airflow:2"
Warning BackOff 36m kubelet, aks-test Back-off restarting failed container
Normal Pulled 36m (x3 over 37m) kubelet, aks-test Container image "k8s.gcr.io/git-sync:v3.1.2" already present on machine
Normal Created 36m (x3 over 37m) kubelet, aks-test Created container git-sync
Normal Started 36m (x3 over 37m) kubelet, aks-test Started container git-sync
Normal Created 36m (x3 over 36m) kubelet, aks-test Created container airflow-console
Normal Pulled 36m (x2 over 36m) kubelet, aks-test Container image "test.azurecr.io/airflow:2" already present on machine
Normal Started 36m (x3 over 36m) kubelet, aks-test Started container airflow-console
Warning BackOff 2m15s (x178 over 36m) kubelet, aks-test Back-off restarting failed container
【问题讨论】:
-
看起来您的 pod 没有运行。你有
kubectl get po airflow-console-xxxxxxx-xxxxx -n airflow的输出吗? -
您能否发布完整的
kubectl describe pod/airflow-console-xxxxxxx-xxxxx -n airflow以及您用于创建它的清单(yaml)? -
需要更多有关 pod 状态的信息来帮助调查,您的 pod 清楚地表明它处于错误状态。
标签: kubernetes kubectl azure-aks