在GKE上进行集群更新后,容器日志不起作用 [英] Container logs not working after cluster update on GKE

查看:82
本文介绍了在GKE上进行集群更新后,容器日志不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近,我在运行多个容器的群集上进行了升级,这些容器支持用Java编写的微服务(使用默认的Spring Boot的log4j2默认配置).从那时起,容器日志不再被更新. kubectl日志命令运行良好,可以使用此命令查看所有最近的日志,但是应该显示在GKE仪表板中的日志不再起作用.我检查了Google的Loggin API并启用了它.

Recently I did an upgrade on my cluster that's running multiple containers for microservices written in Java (using default Spring Boot's log4j2 default configuration). Since then, the container log is not being updated anymore. The kubectl logs command is working fine, all the recent logs can be seen using this command, but the logs that should be appearing in the GKE dashboard is simply not working anymore. I checked the Google's Loggin API and it's enabled.

有人知道这可能是什么原因或如何解决?

Does anyone know what's the possible reasons for this or how to solve it?

推荐答案

解决方案是禁用 Legacy Stackdriver ,并启用 Stackdriver Kubernetes Engine监控:

The solution was to disable the Legacy Stackdriver and enable Stackdriver Kubernetes Engine Monitoring:

  1. 转到群集页面,然后单击编辑";
  2. 同时禁用旧版Stackdriver监视和日志记录;
  3. 使用系统和工作负载日志记录和监视"选项启用Stackdriver Kubernetes Engine监视

这篇关于在GKE上进行集群更新后,容器日志不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆