Last active
August 3, 2022 01:33
-
-
Save haeramkeem/e17a75787f06548e2a2fdc829606a1a1 to your computer and use it in GitHub Desktop.
Sidecar logging example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: sidecar-logging-example | |
labels: | |
app: sidecar-logging-example | |
spec: | |
replicas: 2 | |
selector: | |
matchLabels: | |
app: sidecar-logging-example-pod | |
template: | |
metadata: | |
labels: | |
app: sidecar-logging-example-pod | |
spec: | |
containers: | |
- name: timelog | |
image: docker.io/haeramkeem/py-timelog:0.0.2 | |
env: | |
- name: LOG_FILE_PATH | |
value: "/var/log/time.log" | |
- name: LOG_INTERVAL | |
value: "5" | |
volumeMounts: | |
- name: varlog | |
mountPath: /var/log | |
- name: sidecar | |
image: docker.io/haeramkeem/fluentd-es:7.17-1.14 | |
env: | |
- name: ES_HOST_URL | |
value: "elasticsearch-master.default" | |
- name: SRC_FILE_PATH | |
value: "/var/log/time.log" | |
- name: SRC_TAG | |
valueFrom: | |
fieldRef: | |
fieldPath: metadata.name | |
volumeMounts: | |
- name: varlog | |
mountPath: /var/log | |
volumes: | |
- name: varlog | |
emptyDir: {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment