Get all pod logs on k8s launching failure (#9317)
Co-authored-by: Daniel Imberman <daniel@astronomer.io>
This commit is contained in:
Родитель
1459970b3b
Коммит
8b0073d8fb
|
@ -379,16 +379,8 @@ function dump_kubernetes_logs() {
|
||||||
--cluster "${KUBECTL_CLUSTER_NAME}" | grep airflow | head -1)
|
--cluster "${KUBECTL_CLUSTER_NAME}" | grep airflow | head -1)
|
||||||
echo "------- pod description -------"
|
echo "------- pod description -------"
|
||||||
kubectl describe pod "${POD}" --cluster "${KUBECTL_CLUSTER_NAME}"
|
kubectl describe pod "${POD}" --cluster "${KUBECTL_CLUSTER_NAME}"
|
||||||
echo "------- webserver init container logs - init -------"
|
echo "------- airflow pod logs -------"
|
||||||
kubectl logs "${POD}" -c init --cluster "${KUBECTL_CLUSTER_NAME}" || true
|
kubectl logs "${POD}" --all-containers=true || true
|
||||||
if [[ "${KUBERNETES_MODE}" == "git" ]]; then
|
|
||||||
echo "------- webserver init container logs - git-sync-clone -------"
|
|
||||||
kubectl logs "${POD}" -c git-sync-clone --cluster "${KUBECTL_CLUSTER_NAME}" || true
|
|
||||||
fi
|
|
||||||
echo "------- webserver logs -------"
|
|
||||||
kubectl logs "${POD}" -c webserver --cluster "${KUBECTL_CLUSTER_NAME}" || true
|
|
||||||
echo "------- scheduler logs -------"
|
|
||||||
kubectl logs "${POD}" -c scheduler --cluster "${KUBECTL_CLUSTER_NAME}" || true
|
|
||||||
echo "--------------"
|
echo "--------------"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче