Search code examples
kubernetesgoogle-kubernetes-enginekubectl

Container logs not working after cluster update on GKE


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?


Solution

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

    1. Go to the cluster page and click on edit;
    2. Disable both Legacy Stackdriver Monitoring and Logging;
    3. Enable Stackdriver Kubernetes Engine Monitoring using the option "System and workload logging and monitoring"