I am having some issues with the log entries in Stackdriver using GKE, when the log entry is greater than 20 KB, this is split into several chunks. According to GCP documentation, the limit size of log entries is 256 KB (https://cloud.google.com/logging/quotas). I have tested several configurations and found out something very curious: when the Cluster is set up using Ubuntu nodes thet issue is seen. When I use the default node type: Container-Optimized OS (cos), Stackdriver captures the log entries correctly.
Can somebody explain me the cause of this error?. I have checked this Logging with Docker and Kubernetes. Logs more than 16k split up, I think it could be related.
Additional information:
- GKE static version: v1.14.10-gke.50
- Kernel version (nodes): 4.15.0-1069-gke
- OS image (nodes): Ubuntu 18.04.5 LTS
- Docker version (nodes): 18.9.7
- Cloud Operations for GKE: Legacy Logging and Monitoring
New feedback: I have created more clusters using different GKE versions and another "Cloud Operations for GKE" implementation (System and Workload and Monitoring) and the issue is the same one. Curret steps to reproduce the issue:
- Create a GKE cluster using as image Ubuntu (No matter the GKE version)
- Deploy an application which logs a log entry greater than 16 KB. I am using a Spring boot application + Log4j 1.X
- Look for the log entry in the Stackdriver web console. The log entry is split into multiple chunks.