client-go GetLogs query very slow

6/23/2021

I use client-go to query pod logs. When the parameter follow=false is set, the query is very fast, but when I set the parameter follow=true, the query becomes very slow, from the original 20ms to 1 minute. Then use the same function to query the logs of other pods, set follow=true, the query has changed very quickly, but the original pod query log is still very slow, I want to know how to troubleshoot and solve this problem, thank you very much.

req := k.clientSet.CoreV1().Pods(namespace).GetLogs(podName, &corev1.PodLogOptions{
		Container: "mysql",
		Follow: true,
	})
-- iDukeLu
client-go
kubernetes

0 Answers