kubernetes/Yaml文件/exec.yaml

51 lines
819 B
YAML
Raw Normal View History

2023-04-07 10:26:52 +08:00
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