Inadequate Kubernetes Logging and Monitoring
A miner ran for weeks because nothing was watching.
What Is Inadequate Kubernetes Logging and Monitoring?
Kubernetes records no audit log unless you configure one, so a cluster with auditing off cannot tell you what happened in it. You'll run a cryptominer in a quiet namespace for weeks, then, asked to reconstruct it, find the audit log was never enabled. You'll write an audit policy, add a resource quota and a detection rule, and prove with a canary that the next such action is both recorded and alerted. Maps to OWASP Kubernetes Top Ten K10, Inadequate Logging and Monitoring.
What You'll Learn in Inadequate Kubernetes Logging and Monitoring
- Explain that Kubernetes does not write an audit log without a configured policy.
- Write an audit policy capturing workload changes and sensitive reads.
- Add a detection rule so audit events raise alerts, not just records.
- Use resource quotas to bound what a single namespace can consume.
Inadequate Kubernetes Logging and Monitoring — Training Steps
-
A quiet namespace
Bob has a working ServiceAccount token for Arvendish's cluster, phished from a data engineer. He looks for a namespace where extra workloads will not be noticed. Arvendish streams video. Its clusters run large, bursty batch jobs, so unusual CPU use rarely looks out of place.
-
Run the miner
Bob deploys a cryptominer disguised as a batch job. It requests modest resources so it blends in, and runs continuously.
-
Still running, weeks later
Bob checks back after three weeks. The job is still there, and nothing has flagged it.
-
Check your understanding
-
Reconstruct the mining incident
Arvendish's security team asks Alice to reconstruct how the miner got in, and Alice finds she cannot.
-
Look for the audit log
Alice goes to pull the audit log and finds the API server was never told to write one.
-
Open the API server config and a quota
Alice opens the API server configuration and a resource quota template for the analytics namespace.
-
No policy, no record
The configuration has authorization, but no audit policy at all.
-
Write an audit policy
Alice replaces the placeholder with an audit policy: metadata for reads of pods, exec and Secrets, full request and response for workload changes, and metadata for everything else.
-
A quota that bounds the namespace
A quota would not have caught a modest miner on its own, but it bounds how much any single namespace can consume, so a runaway or greedy workload hits a ceiling instead of the cloud bill.
Security Framework Coverage
OWASP Kubernetes Top 10
- K10:2025 Inadequate Logging and Monitoring
CWE
- CWE-778 Insufficient Logging
- CWE-770 Allocation of Resources Without Limits or Throttling
MITRE ATT&CK
- T1496 Resource Hijacking
- T1610 Deploy Container
CIS Controls
- CIS 8 Audit Log Management
- CIS 4 Secure Configuration of Enterprise Assets and Software
NIST CSF
- PR.AT-02 Individuals in specialized roles are provided with awareness and training so that they possess the knowledge and skills to perform relevant tasks with cybersecurity risks in mind
- PR.PS Platform Security
- DE.AE Adverse Event Analysis
NICE Framework
- IO-WRL-005 Systems Administration
- DD-WRL-001 Cybersecurity Architecture