Reputation: 23
When I apply deploy files in my cluster kubernetes, always generate too many log entries with the DEBUG type set:
An automatic pipeline that runs every day at 8AM, executes a list of commands:
kubectl apply -f $K8S_FILE_PERSISTENTVOLUMECLAIM -n $K8S_NAMESPACE
kubectl apply -f $K8S_FILE_SECRET -n $K8S_NAMESPACE
kubectl apply -f $K8S_FILE_CONFIGMAP -n $K8S_NAMESPACE
kubectl apply -f $K8S_FILE_DEPLOYMENT etc.
After this, Kubernetes creates a lot of log entries (5.000 for minute) with DEBUG type (??).
Version 1.26.6-gke.1700
Any idea on the root cause?
Upvotes: 0
Views: 178
Reputation: 374
You may want to adjust your logging configuration to reduce the volume of logs, while still retaining the necessary information for debugging. Make sure that you are not using DEBUG-level logging excessively.
Review your application's logging configuration and set the log level to an appropriate level like INFO to reduce the volume of DEBUG logs generated.
You might also want to configure log filtering rules to exclude or limit the amount of DEBUG logs that are ingested into Google Cloud Logging. You can use log exclusions to filter out certain log entries based on criteria like log name, severity, or other attributes.
If you want to go over how logging works on GKE and some best practices for log collection, see this document.
Upvotes: 1