Skip to content

Instantly share code, notes, and snippets.

@bharatmicrosystems
Created November 13, 2020 08:22
Show Gist options
  • Save bharatmicrosystems/3d6fa7f04a387675f138eadc20bffd79 to your computer and use it in GitHub Desktop.
Save bharatmicrosystems/3d6fa7f04a387675f138eadc20bffd79 to your computer and use it in GitHub Desktop.
apiVersion: v1
kind: Pod
metadata:
name: sidecar-pod
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-exporter-sidecar
image: nginx
ports:
- containerPort: 80
volumeMounts:
- name: logs
mountPath: /usr/share/nginx/html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment