apiVersion: v1
kind: Pod
metadata:
  name: two-pod
  labels: 
    app: web
spec:
  volumes:
  - name: shared-data
    emptyDir: {}
  containers:
  - name: first
    image: nginx
    resources:
      requests:
        memory: "64Mi"
        cpu: "250m"
      limits:
        memory: "128Mi"
        cpu: "500m"
    volumeMounts:
    - name: shared-data
      mountPath: /usr/share/nginx/html
  - name: second
    image: debian
    resources:
      requests:
        memory: "64Mi"
        cpu: "250m"
      limits:
        memory: "128Mi"
        cpu: "500m"
    volumeMounts:
    - name: shared-data
      mountPath: /pod-data
    command: ["/bin/sh"]
    args:
      - "-c"
      - >
        while true; do
          date >> /pod-data/index.html;
          printf 'Hello from the second container<br>' >> /pod-data/index.html;
          sleep 1;
        done