mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
Merge pull request #2923 from satnam6502/kubelet-log
Collect Kubelet logs with Fluentd->(Elasticsearch|Cloud Logging)
This commit is contained in:
commit
19c88643b8
@ -9,11 +9,18 @@ containers:
|
|||||||
- name: hosts
|
- name: hosts
|
||||||
mountPath: /outerhost
|
mountPath: /outerhost
|
||||||
readOnly: true
|
readOnly: true
|
||||||
|
- name: varlog
|
||||||
|
mountPath: /varlog
|
||||||
|
volumes:
|
||||||
volumes:
|
volumes:
|
||||||
- name: containers
|
- name: containers
|
||||||
source:
|
source:
|
||||||
hostDir:
|
hostDir:
|
||||||
path: /var/lib/docker/containers
|
path: /var/lib/docker/containers
|
||||||
|
- name: varlog
|
||||||
|
source:
|
||||||
|
hostDir:
|
||||||
|
path: /var/log
|
||||||
- name: hosts
|
- name: hosts
|
||||||
source:
|
source:
|
||||||
hostDir:
|
hostDir:
|
||||||
|
@ -6,8 +6,14 @@ containers:
|
|||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: containers
|
- name: containers
|
||||||
mountPath: /var/lib/docker/containers
|
mountPath: /var/lib/docker/containers
|
||||||
|
- name: varlog
|
||||||
|
mountPath: /varlog
|
||||||
volumes:
|
volumes:
|
||||||
- name: containers
|
- name: containers
|
||||||
source:
|
source:
|
||||||
hostDir:
|
hostDir:
|
||||||
path: /var/lib/docker/containers
|
path: /var/lib/docker/containers
|
||||||
|
- name: varlog
|
||||||
|
source:
|
||||||
|
hostDir:
|
||||||
|
path: /var/log
|
||||||
|
@ -52,3 +52,21 @@
|
|||||||
logstash_format true
|
logstash_format true
|
||||||
flush_interval 5s
|
flush_interval 5s
|
||||||
</match>
|
</match>
|
||||||
|
|
||||||
|
<source>
|
||||||
|
type tail
|
||||||
|
format none
|
||||||
|
path /varlog/kubelet.log
|
||||||
|
pos_file /varlog/kubelet.log.pos
|
||||||
|
tag kubelet
|
||||||
|
</source>
|
||||||
|
|
||||||
|
<match kubelet>
|
||||||
|
type elasticsearch
|
||||||
|
log_level info
|
||||||
|
include_tag_key true
|
||||||
|
host %ES_HOST%
|
||||||
|
port 9200
|
||||||
|
logstash_format true
|
||||||
|
flush_interval 5s
|
||||||
|
</match>
|
||||||
|
@ -30,3 +30,21 @@
|
|||||||
# Disable the limit on the number of retries (retry forever).
|
# Disable the limit on the number of retries (retry forever).
|
||||||
disable_retry_limit
|
disable_retry_limit
|
||||||
</match>
|
</match>
|
||||||
|
|
||||||
|
<source>
|
||||||
|
type tail
|
||||||
|
format none
|
||||||
|
time_key time
|
||||||
|
path /varlog/kubelet.log
|
||||||
|
pos_file /varlog/kubelet.log.pos
|
||||||
|
tag kubelet
|
||||||
|
</source>
|
||||||
|
|
||||||
|
<match kubelet>
|
||||||
|
type google_cloud
|
||||||
|
flush_interval 5s
|
||||||
|
# Never wait longer than 5 minutes between retries.
|
||||||
|
max_retry_wait 300
|
||||||
|
# Disable the limit on the number of retries (retry forever).
|
||||||
|
disable_retry_limit
|
||||||
|
</match>
|
||||||
|
Loading…
Reference in New Issue
Block a user