sh
kubectl apply -n tandem-1wofz6 -f - <<EOF
apiVersion: v1
kind: Pod
metadata:
name: shipped
spec:
volumes:
- name: logs
emptyDir: {}
initContainers:
- name: log-shipper
image: busybox
restartPolicy: Always
command: ["sh", "-c", "while true; do echo shipping logs; sleep 5; done"]
volumeMounts:
- name: logs
mountPath: /var/log/app
containers:
- name: web
image: nginx:1.27
volumeMounts:
- name: logs
mountPath: /var/log/nginx
EOFRead the READY column, the sidecar's logs with -c log-shipper, and its State in kubectl describe pod shipped.