k8s-samples/CKA_Course/pods/sidecar.yaml

22 lines
478 B
YAML
Raw Permalink Normal View History

2022-08-17 02:59:58 +00:00
apiVersion: v1
kind: Pod
metadata:
name: sidecar-pod
spec:
containers:
- name: busybox1
image: busybox
command: ['sh', '-c', 'while true; do echo logs data > /output/output.log; sleep 5; done']
volumeMounts:
- name: sharedVol
mountPath: /output
- name: sidecar
image: busybox
command: ['sh', '-c', 'tail -f /intput/output.log']
volumeMounts:
- name: sharedVol
mountPath: /input
volumes:
- name: sharedVol
emptyDir: {}