apiVersion: v1
kind: Pod
metadata:
  name: multi-container-pod
  labels:
    app: multi-container-pod
    svc: example
spec:
  volumes:
    - name: html
      emptyDir: {}
  containers:
    - name: nginx
      image: nginx
      ports:
        - containerPort: 80
      volumeMounts:
        - name: html
          mountPath: /usr/share/nginx/html
      resources:
        requests:
          memory: 20Mi
          cpu: 30m
        limits:
          memory: 50Mi
          cpu: 30m
    - name: date
      image: debian
      volumeMounts:
        - name: html
          mountPath: /html
      command: ["/bin/sh", "-c"]
      args:
        - while true; do
          date > /html/index.html.tmp;
          mv /html/index.html.tmp /html/index.html;
          sleep 1;
          done
      resources:
        requests:
          memory: 15Mi
          cpu: 10m
        limits:
          memory: 15Mi
          cpu: 10m
