Created
December 6, 2022 00:07
-
-
Save daxmc99/b46f1dad27978a7c1aa1dee8dd71eb88 to your computer and use it in GitHub Desktop.
Kubernetes test pods for restarting and cpu use
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: v1 | |
kind: Pod | |
metadata: | |
creationTimestamp: null | |
labels: | |
run: cpu-hungry | |
name: cpu-hungry | |
spec: | |
containers: | |
- image: ubuntu | |
name: hungry-container | |
command: ["/bin/sh"] | |
args: | |
- "-c" | |
- "apt-get update && apt-get install -y stress && stress --verbose --cpu 8" | |
resources: | |
limits: | |
cpu: "50m" | |
dnsPolicy: ClusterFirst | |
restartPolicy: Always | |
status: {} |
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: v1 | |
kind: Pod | |
metadata: | |
creationTimestamp: null | |
labels: | |
run: restart | |
name: restart | |
spec: | |
containers: | |
- image: busybox | |
name: restart-container | |
command: ["/bin/sh"] | |
args: | |
- "-c" | |
- "sleep 5 && echo hi && exit 1" | |
resources: {} | |
dnsPolicy: ClusterFirst | |
restartPolicy: Always | |
status: {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment