Skip to content

Instantly share code, notes, and snippets.

@bharatmicrosystems
Created November 13, 2020 08:24
Show Gist options
  • Save bharatmicrosystems/52087ae7a89e792baae0ee5a5952c6b4 to your computer and use it in GitHub Desktop.
Save bharatmicrosystems/52087ae7a89e792baae0ee5a5952c6b4 to your computer and use it in GitHub Desktop.
apiVersion: v1
kind: Pod
metadata:
name: adapter-pod
labels:
app: adapter-app
spec:
volumes:
- name: logs
emptyDir: {}
containers:
- name: app-container
image: alpine
command: ["/bin/sh"]
args: ["-c", "while true; do date >> /var/log/app.log; sleep 2;done"]
volumeMounts:
- name: logs
mountPath: /var/log
- name: log-adapter
image: alpine
command: ["/bin/sh"]
args: ["-c", "tail -f /var/log/app.log|sed -e 's/^/Date /' > /var/log/out.log"]
volumeMounts:
- name: logs
mountPath: /var/log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment