上传文件至 'Yaml文件'

This commit is contained in:
diandian 2023-04-07 10:26:52 +08:00
parent a7869ce54b
commit 088b4645cb
1 changed files with 50 additions and 0 deletions

50
Yaml文件/exec.yaml Normal file
View File

@ -0,0 +1,50 @@
apiVersion: v1
kind: PersistentVolume
metadata:
name: pv-exec
spec:
capacity:
storage: 1000Mi
accessModes:
- ReadWriteMany
nfs:
server: 10.36.174.164
path: /kubernetes-6
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: pvc-exec
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 90Mi
---
apiVersion: v1
kind: Pod
metadata:
name: exec
labels:
test: exec
spec:
containers:
- name: exec
image: 10.36.174.164/xingdian/nginx:v1
volumeMounts:
- name: exec
mountPath: /usr/share/nginx/html
livenessProbe:
exec:
command:
- cat
- /usr/share/nginx/html/index.html
initialDelaySeconds: 5
periodSeconds: 5
volumes:
- name: exec
persistentVolumeClaim:
claimName: pvc-exec