mirror of
https://github.com/jpetazzo/container.training.git
synced 2026-02-14 09:39:56 +00:00
25 lines
508 B
YAML
25 lines
508 B
YAML
apiVersion: v1
|
|
kind: Pod
|
|
metadata:
|
|
name: openebs-local-hostpath-pod
|
|
spec:
|
|
volumes:
|
|
- name: storage
|
|
persistentVolumeClaim:
|
|
claimName: local-hostpath-pvc
|
|
containers:
|
|
- name: better
|
|
image: alpine
|
|
command:
|
|
- sh
|
|
- -c
|
|
- |
|
|
while true; do
|
|
echo "$(date) [$(hostname)] Kubernetes is better with PVs." >> /mnt/storage/greet.txt
|
|
sleep $(($RANDOM % 5 + 20))
|
|
done
|
|
volumeMounts:
|
|
- mountPath: /mnt/storage
|
|
name: storage
|
|
|