我无法进入蔚蓝的Kubernetes吊舱

时间:2020-04-18 22:04:57

标签: kubernetes kubectl azure-kubernetes

我想检查豆荚内部图像中是否有瑕疵,但出现以下错误。正如我在描述中验证的那样,容器的名称正确。我还能做些什么才能在群集中建立连接?

命令:kubectl exec -it -c airflow-console -n airflow airflow-console-xxxxxxx-xxxxx bash

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

命令:kubectl描述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

1 个答案:

答案 0 :(得分:0)

此行

is MoviesListViewModel.State.Result -> {
                        itemCount = result.list.size
                        if (currentPage != PaginationListener.PAGE_START) {
                            movieListAdapter?.removeLoading()
                            Log.d("load_more", "remove loading")

                        }
                        movieListAdapter?.addItems(result.list)
                        if (currentPage < result.totalPage) {
                            movieListAdapter?.addLoading()
                            Log.d("load_more", "add loading")

                        } else {
                            isLastPage = true
                        }
                        isLoading = false

表明您的容器/容器处于故障状态。由于该容器未激活,因此将阻止您执行该容器中的命令。

要了解您的吊舱/容器为何处于不良状态,您应该查看发生故障的容器的日志

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

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

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

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