[skip e2e]Update script for k8s log export (#19638)

Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>

Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>
pull/19645/head
zhuwenxing 2022-10-08 17:48:58 +08:00 committed by GitHub
parent 65c9ae0c70
commit 7e620a7ad1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -47,8 +47,8 @@ echo "export logs start"
for pod in ${array[*]}
do
echo "export logs for pod $pod "
kubectl logs $pod -n ${ns_name} > ./$log_dir/pod_log/$pod.log 2>&1
kubectl logs $pod -n ${ns_name} > ./$log_dir/pod_log/$pod.log 2>&1 || echo "export log for pod $pod failed"
kubectl logs $pod --previous -n ${ns_name} > ./$log_dir/pod_log_previous/$pod.log 2>&1 || echo "pod $pod has no previous log"
kubectl describe pod $pod -n ${ns_name} > ./$log_dir/pod_describe/$pod.log
kubectl describe pod $pod -n ${ns_name} > ./$log_dir/pod_describe/$pod.log || echo "export describe for pod $pod failed"
done
echo "export logs done"