Files
Deploy-Laboratory/ansible/files/03-06/nfs-pvc-verify-job.yaml
2026-03-29 09:08:01 +08:00

28 lines
800 B
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# docs/03-06-k3s-使用nfs存储.md — 自动化验收用:挂载 nfs-pvc-demo 并写文件OC3 证据)
# 与 nfs-pv-pvc-demo.yaml 配合;手动学习 PV/PVC 时可不应用本文件。
apiVersion: batch/v1
kind: Job
metadata:
name: nfs-pvc-verify-demo
namespace: default
spec:
backoffLimit: 3
template:
spec:
restartPolicy: Never
containers:
- name: verify-write
image: busybox:1.36
command:
- /bin/sh
- -c
- echo "ok-$(date +%s)" > /data/.verify-nfs && sync && test -f /data/.verify-nfs
volumeMounts:
- name: data
mountPath: /data
readOnly: false
volumes:
- name: data
persistentVolumeClaim:
claimName: nfs-pvc-demo