Back to all scenarios
Scenario #97
Cluster Management
K8s v1.22, GKE
Kubernetes API Server Slowness Due to Excessive Logging
The Kubernetes API server became slow due to excessive log generation from the kubelet and other components.
Find this helpful?
What Happened
Excessive logging from the kubelet and other components overwhelmed the API server, causing it to become slow and unresponsive.
Diagnosis Steps
- 1Monitored API server performance using kubectl top pod and noticed resource spikes.
- 2Analyzed log files and found an unusually high number of log entries from the kubelet.
Root Cause
Excessive logging was causing resource exhaustion on the API server.
Fix/Workaround
• Reduced the verbosity of logs from the kubelet and other components.
• Configured log rotation to prevent logs from consuming too much disk space.
Lessons Learned
Excessive logging can cause performance degradation if not properly managed.
How to Avoid
- 1Set appropriate logging levels for components based on usage.
- 2Implement log rotation and retention policies to avoid overwhelming storage.