Scenario
Your organization runs a production Kubernetes cluster on Linux-based nodes. On-call SREs receive alerts for increased latency in application responses and occasional HTTP 503 errors. The cluster uses multiple workers, but one node consistently shows high load averages. The business impact is noticeable during peak hours.
Symptoms
- Application response time p95 spikes from 300ms to over 2s.
kubectl top nodesshows high CPU/memory usage on one node.- Users report intermittent timeouts.
- Node load average (1m) exceeds the number of CPU cores.
dmesgreveals OOM (Out-Of-Memory) events or disk I/O warnings.
Diagnosis
Start from a high-level view and narrow down. Use these Linux commands to gather evidence.
1. Check Overall System Load
uptime gives load averages over 1, 5, and 15 minutes. A 1-minute load significantly higher than 15-minute suggests a recent spike.
top -b -n 1 shows processes sorted by CPU usage. Pay attention to wa (I/O wait) and st (steal time).
2. Analyze CPU and Memory
vmstat 1 5 reports process, memory, paging, block IO, traps, and CPU activity. Look at r (runnable processes), b (blocked processes), si, so (swap in/out), us, sy, id, wa.
free -m shows memory usage. Check for low available memory and high swap usage.
ps aux --sort=-%mem | head -20 identifies the top memory consumers.
3. Inspect Disk I/O
iostat -x 1 reports disk utilization, I/O wait, and queue size. High %util or high await indicates disk bottleneck.
df -h checks filesystem space; full disks cause application failures.
4. Review System Logs
dmesg -T | tail -30 shows kernel messages, including OOM killer events, hardware errors, or filesystem issues.
journalctl -u kubelet --since "1 hour ago" highlights kubelet problems (e.g., failing to mount volumes, node status flapping).
5. Check Kubernetes Node Health
kubectl describe node <node-name> reveals conditions like MemoryPressure, DiskPressure, PIDPressure. Also shows container runtime issues.
kubectl get events --sort-by='.lastTimestamp' surfaces recent cluster events.
Risk Controls
- All the above commands are read-only and safe for production.
- Do not run
stressorsysbenchon production nodes unless explicitly approved. - Avoid
kill -9on critical processes; usesystemctl restartonly after confirming the process is not the cause. - Before making any configuration changes, save current settings (e.g.,
sysctl -a > /tmp/sysctl.bak).
Rollback
- If you adjust kernel parameters (e.g.,
sysctl -w vm.swappiness=10), restore them withsysctl -p /etc/sysctl.confor reboot. - If you modify Kubernetes node labels or taints, reverse them immediately using
kubectl label node <name> <key>-orkubectl taint node <name> <key>-. - If you restart kubelet, monitor it; if it fails, use
systemctl status kubeletto see the error and revert any changed files.
Verification
After applying fixes, re-run key commands:
uptimeshould show declining load averages.vmstatshould show lowwaand plenty of idle CPU.- Application p95 latency should return to baseline.
kubectl get nodesshows all nodes inReadystatus.
When to Submit an OpsGlobal Ticket
Contact OpsGlobal when: - The issue persists after you have performed the basic steps. - You need 24/7 coverage for ongoing observation. - Root cause is beyond your team's Linux or Kubernetes expertise. - You need an independent second opinion on performance-affecting changes.
Our SRE team can take over troubleshooting, apply hotfixes, and provide a detailed postmortem.
Use cases
Useful for teams handling DevOps issues and needing a clear troubleshooting and delivery workflow.
Problem background
A practical guide to diagnosing and resolving Linux production issues in Kubernetes environments, with commands, risk controls, rollback, and escalation paths.
Troubleshooting steps
Confirm impact and recent changes, collect logs, configuration and metrics, then apply fixes from low to high risk.
Command examples
Replace sample resource names with real values and store passwords, tokens and keys in environment variables.
Risks
Before production changes, confirm backups, access boundaries, change windows and rollback paths.
Rollback plan
Keep original configuration and release versions; roll back config, images or database changes if metrics degrade.
Deliverables
Root-cause notes, key commands, remediation steps, verification results and follow-up recommendations.
Need help with a similar technical issue?
If your servers, Kubernetes, Docker, CI/CD, databases or monitoring systems have similar issues, submit logs and config files for remote diagnosis.