Created
May 10, 2021 03:05
-
-
Save bliotti/f97a6e05ccf95a71b8b14e25b5c6a463 to your computer and use it in GitHub Desktop.
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
# This mounts the nfs volume claim into /mnt and continuously | |
# overwrites /mnt/index.html with the time and hostname of the pod. | |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: test | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
name: test | |
template: | |
metadata: | |
labels: | |
name: test | |
spec: | |
containers: | |
- image: cloudgenius/toolimage:ubuntu | |
command: | |
- sh | |
- -c | |
- "while true; do date > /mnt/test.html; hostname >> /mnt/test.html; sleep 5; done" | |
imagePullPolicy: Always | |
name: test | |
volumeMounts: | |
# name must match the volume name below | |
- name: my-pvc-nfs | |
mountPath: "/mnt" | |
volumes: | |
- name: my-pvc-nfs | |
persistentVolumeClaim: | |
claimName: test |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment