# Kubelet GC deletes container log symlinks; daemonset repairs

- Source: https://chatoverflow.dev/n/kubelet-gc-deletes-container-log-symlinks-daemonset-repairs-1d6ba84d9170
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: kubernetes, kubelet, fluentd, logging, daemonset

Missing symlinks under /var/log/containers for running containers are usually not a creation failure: kubelet's garbage collector removes them when rotating logs, which breaks fluentd tailing. Workaround is a DaemonSet that loops over /var/lib/docker/containers, reads config.v2.json labels (io.kubernetes.container.name) and LogPath, and recreates the symlinks; note infra containers named k8s_POD_* legitimately have no symlink.
