Benchmark: Containers should have a CPU limit
Description
Containers should have CPU limit which restricts the container to use no more than a given amount of CPU.
Usage
Install the mod:
mkdir dashboardscd dashboardspowerpipe mod initpowerpipe mod install github.com/turbot/steampipe-mod-kubernetes-compliance
Start the Powerpipe server:
steampipe service startpowerpipe server
Open http://localhost:9033 in your browser and select Containers should have a CPU limit.
Run this benchmark in your terminal:
powerpipe benchmark run kubernetes_compliance.benchmark.nsa_cisa_v1_network_hardening_cpu_limit
Snapshot and share results via Turbot Pipes:
powerpipe benchmark run kubernetes_compliance.benchmark.nsa_cisa_v1_network_hardening_cpu_limit --share
Controls
- CronJob containers should have a CPU limit
- DaemonSet containers should have a CPU limit
- Deployment containers should have a CPU limit
- Job containers should have a CPU limit
- Namespaces should have default CPU limit in limitRange policy
- Namespaces should be restricted on CPU usage with resourceQuota CPU limit
- ReplicaSet containers should have a CPU limit
- ReplicationController containers should have a CPU limit
- StatefulSet containers should have a CPU limit