Skip to content

Commit 64274ef

Browse files
authored
Merge pull request kubernetes#86221 from Random-Liu/upload-containerd-logs
[Windows] Upload containerd logs to stackdriver
2 parents acb2994 + c229c78 commit 64274ef

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

cluster/gce/windows/k8s-node-setup.psm1

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1492,7 +1492,7 @@ function Install_Containerd {
14921492
# Register and start containerd service.
14931493
function Start_Containerd {
14941494
Log-Output "Creating containerd service"
1495-
containerd.exe --register-service
1495+
containerd.exe --register-service --log-file ${env:LOGS_DIR}/containerd.log
14961496
Log-Output "Starting containerd service"
14971497
Start-Service containerd
14981498
}
@@ -1712,6 +1712,20 @@ $FLUENTD_CONFIG = @'
17121712
tag kube-proxy
17131713
</source>
17141714
1715+
# Example:
1716+
# time="2019-12-10T21:27:59.836946700Z" level=info msg="loading plugin \"io.containerd.grpc.v1.cri\"..." type=io.containerd.grpc.v1
1717+
<source>
1718+
@type tail
1719+
format multiline
1720+
multiline_flush_interval 5s
1721+
format_firstline /^time=/
1722+
format1 /^time="(?<time>[^ ]*)" level=(?<severity>\w*) (?<message>.*)/
1723+
time_format %Y-%m-%dT%H:%M:%S.%N%z
1724+
path /etc/kubernetes/logs/containerd.log
1725+
pos_file /etc/kubernetes/logs/gcp-containerd.log.pos
1726+
tag container-runtime
1727+
</source>
1728+
17151729
<match reform.**>
17161730
@type record_reformer
17171731
enable_ruby true

0 commit comments

Comments
 (0)