31 lines
587 B
YAML
31 lines
587 B
YAML
## Kubernetes Fundamentals labs v1.4.5
|
|
apiVersion: v1
|
|
kind: Pod
|
|
metadata:
|
|
name: volume-example
|
|
spec:
|
|
containers:
|
|
- name: nginx
|
|
image: nginx:stable-alpine
|
|
ports:
|
|
- containerPort: 80
|
|
volumeMounts:
|
|
- name: html
|
|
mountPath: /usr/share/nginx/html
|
|
readOnly: true
|
|
- name: content
|
|
image: alpine:latest
|
|
volumeMounts:
|
|
- name: html
|
|
mountPath: /html
|
|
command: ["/bin/sh", "-c"]
|
|
args:
|
|
- while true; do
|
|
echo $(date)"<br />" >> /html/index.html;
|
|
sleep 5;
|
|
done
|
|
volumes:
|
|
- name: html
|
|
emptyDir: {}
|
|
|