kind: Pod
apiVersion: v1
metadata:
 name: pod-with-sidecar
 namespace: jmcf
spec:
   volumes:
     - name: shared-logs
       emptyDir: {}
   containers:
     # Main application container
     - name: app-container
     # Simple application: write the current date every 5s.
       image: alpine
       command: ["/bin/sh"]
       args: ["-c", "while true; do date >> /var/log/app.txt; sleep 5; done"]
     # Mount the pod's shared log file into the app container.
       volumeMounts:
         - name: shared-logs
           mountPath: /var/log
     # Sidecar container
     - name: sidecar-container
     # Simple sidecar: display log files using nginx.
       image: nginx:1.7.9
       ports:
         - containerPort: 80
       # Mount the pod's shared log file into the sidecar
       # container. In this case, nginx will serve the files
       # in this directory.
       volumeMounts:
         - name: shared-logs
           mountPath: /usr/share/nginx/html