Last active
May 2, 2025 04:44
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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