Skip to content

Instantly share code, notes, and snippets.

@Cyb3rDudu
Last active May 2, 2025 04:44
Show Gist options
  • Save Cyb3rDudu/b28fd13d312c313a60a0b81c7e1f1771 to your computer and use it in GitHub Desktop.
Save Cyb3rDudu/b28fd13d312c313a60a0b81c7e1f1771 to your computer and use it in GitHub Desktop.
7 CPU-hogging pods, each requesting and limiting 5000m CPU to test CPU overcommitting
apiVersion: apps/v1
kind: Deployment
metadata:
name: cpu-overcommit-demo
labels:
app: cpu-overcommit-demo
spec:
replicas: 4
selector:
matchLabels:
app: cpu-overcommit-demo
template:
metadata:
labels:
app: cpu-overcommit-demo
spec:
containers:
- name: stress-ng
image: alexeiled/stress-ng
args:
- --cpu
- "4"
- --io
- "2"
- --vm
- "1"
- --vm-bytes
- "1G"
- --timeout
- "60s"
- --metrics-brief
resources:
requests:
cpu: "2"
memory: "256Mi"
limits:
cpu: "4"
memory: "2Gi"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment