我无法进入 azure kubernetes pod



我想在pod内部检查图像中的缺陷,但出现了以下错误。正如我在描述中验证的那样,容器的名称是正确的。我还能做些什么来获得群集中的连接?

命令:kubectl exec-it-c气流控制台-n气流控制台-xxxxxxxx-xxxxxx bash

error: unable to upgrade connection: container not found ("airflow-console")

命令:kubectl描述吊舱/气流控制台-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

此行

Warning  BackOff    2m15s (x178 over 36m)  kubelet, aks-test  Back-off restarting failed container

显示您的pod/容器处于故障状态。这将阻止您在容器中执行命令,因为容器未处于活动状态。

要了解为什么你的吊舱/容器处于不良状态,你应该查看失败容器的日志

kubectl logs -n airflow airflow-console-xxxxxxx-xxxxx -c airflow-console

或者注销以前失败的容器。(有时有帮助(

kubectl logs -n airflow airflow-console-xxxxxxx-xxxxx -c airflow-console -p

这解释了用户无法执行到容器中的主要原因。

相关内容

  • 没有找到相关文章

最新更新