apiVersion: v1
kind: Pod
metadata:
name: volume-pod
spec:
containers:
- name: nginx-container
image: nginx
ports:
- containerPort: 80
volumeMounts:
- name: volume-pod
mountPath: /nginx-volume
- name: busybox-container
image: busybox
command: ['sh', '-c', 'echo The app is running! && sleep 3600']
volumeMounts:
- name: volume-pod
mountPath: /busybox-volume
volumes:
- name: volume-pod
hostPath:
path: /tmp/volume-pod
标签:busybox,name,nginx,image,volume,yaml,pod
From: https://www.cnblogs.com/farbranch/p/16825748.html