2021-07-28 17:25:34 +00:00
|
|
|
apiVersion: v1
|
|
|
|
kind: Pod
|
|
|
|
metadata:
|
|
|
|
name: volume-test
|
|
|
|
namespace: default
|
|
|
|
spec:
|
|
|
|
containers:
|
|
|
|
- name: volume-test
|
2023-05-04 17:43:54 +00:00
|
|
|
image: busybox:stable
|
2021-07-28 17:25:34 +00:00
|
|
|
imagePullPolicy: IfNotPresent
|
2023-05-04 17:43:54 +00:00
|
|
|
command:
|
|
|
|
- sh
|
|
|
|
- "-c"
|
|
|
|
- "touch /data/file1 && sleep infinity"
|
2021-07-28 17:25:34 +00:00
|
|
|
volumeMounts:
|
|
|
|
- name: volv
|
|
|
|
mountPath: /data
|
2023-05-04 17:43:54 +00:00
|
|
|
securityContext:
|
|
|
|
runAsUser: 1000
|
|
|
|
runAsGroup: 1000
|
2021-07-28 17:25:34 +00:00
|
|
|
volumes:
|
|
|
|
- name: volv
|
|
|
|
persistentVolumeClaim:
|
|
|
|
claimName: local-path-pvc
|