blob: 68826809697f77ea945a6a301dea4de94b52c891 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
apiVersion: apps/v1beta2
kind: DaemonSet
metadata:
name: logs-kafka
namespace: kafka
spec:
selector:
matchLabels:
k8s-app: logs-kafka
version: v1
kubernetes.io/cluster-service: "true"
template:
metadata:
labels:
k8s-app: logs-kafka
version: v1
kubernetes.io/cluster-service: "true"
spec:
containers:
- name: kafkacat
image: solsson/kafkacat@sha256:ebebf47061300b14a4b4c2e1e4303ab29f65e4b95d34af1b14bb8f7ec6da7cef
command:
- sh
- -ec
- >
cd /var/log/containers/;
tail
-n 0
--follow=name
*.log
|
kafkacat
-b kafka-0.broker.kafka.svc.cluster.local:9092,kafka-1.broker.kafka.svc.cluster.local:9092,kafka-2.broker.kafka.svc.cluster.local:9092
-t ops-kube-logs-raw-001
-P
#-z snappy
resources:
limits:
memory: 100Mi
requests:
cpu: 100m
memory: 100Mi
volumeMounts:
- name: varlog
mountPath: /var/log
readOnly: true
terminationGracePeriodSeconds: 10
volumes:
- name: varlog
hostPath:
path: /var/log
|