-
Notifications
You must be signed in to change notification settings - Fork 709
Closed
Labels
kind/unconfirmed-bug-claimUnconfirmed bug claimUnconfirmed bug claim
Description
Description
nerdctl -n k8s.log logs CONTAINER_ID -f won't output logs after kubelet rotate log filer of the container.
Related issue with k8s kubernetes/kubernetes#115701.
Steps to reproduce the issue
- Add the config
containerLogMaxSize: 5Mitokubelet.yaml. So kubelet will rotate the log soon. - Build a image with this program
package main
import (
"fmt"
"time"
)
func main() {
i := 0
for range time.Tick(10 * time.Microsecond) {
fmt.Printf("print log to stand out %d\n", i)
i++
}
}
- Create a deploy with the previous image.
- Run the command
nerdctl -n k8s.io logs containerd -f
Describe the results you received and expected
nerdctl output logs correctly after the log file is rotated.
What version of nerdctl are you using?
v2.0.0-rc.0
Are you using a variant of nerdctl? (e.g., Rancher Desktop)
None
Host information
No response
Metadata
Metadata
Assignees
Labels
kind/unconfirmed-bug-claimUnconfirmed bug claimUnconfirmed bug claim