apiVersion: v1
kind: Pod
metadata:
  name: two-containers
spec:

  restartPolicy: Never

  volumes:
  - name: shared-data
    emptyDir: {}

  containers:

  - name: nginx-container
    image: nginx
    volumeMounts:
    - name: shared-data
      mountPath: /usr/share/nginx/html

  - name: busy-container
    image: busybox
    volumeMounts:
    - name: shared-data
      mountPath: /var/log
    command: ["/bin/sh"]
    args: ["-c", "while true; do echo ‘Hi I am from Main container’ >> /var/log/index.html; sleep 5; done"]

