Last active
June 23, 2021 06:43
-
-
Save kaxing/3f30d2c33285208d152156cfa94a3a97 to your computer and use it in GitHub Desktop.
exceeding volume claim size
This file contains 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
# This an example to create Disk Pressure on Kubernetes cluster by overwriting claim volume. | |
--- | |
apiVersion: v1 | |
kind: PersistentVolumeClaim | |
metadata: | |
name: longhorn-pvc-33g | |
spec: | |
accessModes: | |
- ReadWriteOnce | |
storageClassName: longhorn | |
resources: | |
requests: | |
storage: 33Gi | |
--- | |
apiVersion: v1 | |
kind: Pod | |
metadata: | |
name: test-pod-33g | |
namespace: default | |
spec: | |
restartPolicy: Always | |
containers: | |
- name: test-pod-33g | |
image: nginx:stable-alpine | |
imagePullPolicy: IfNotPresent | |
command: ["/bin/sh"] | |
args: ["-c", "while [ $? -gt 0 ]; do mountpoint /data; done && dd if=/dev/urandom of=/data/test bs=10M conv=notrunc"] | |
livenessProbe: | |
exec: | |
command: | |
- ls | |
- /data/lost+found | |
initialDelaySeconds: 5 | |
periodSeconds: 5 | |
volumeMounts: | |
- name: longhorn-pv-33g | |
mountPath: /data | |
ports: | |
- containerPort: 80 | |
volumes: | |
- name: longhorn-pv-33g | |
persistentVolumeClaim: | |
claimName: longhorn-pvc-33g |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment