If you are running docker with default settings, you will probably find one day that the disk space on your machine begin to approach 100% state.

That’s because by default, docker will log all stdout from the containers to a log files, and it won’t rotate nor trim them.

Luckily there is a quick solution to that

One of my etcd nodes in my home k8s cluster has been failing with following message:

12021-01-14 11:16:09.233458 I | embed: listening for peers on 192.168.0.33:2380
2raft2021/01/14 11:16:09 tocommit(29492601) is out of range [lastIndex(29492469)]. Was the raft log corrupted, truncated, or lost?
3panic: tocommit(29492601) is out of range [lastIndex(29492469)]. Was the raft log corrupted, truncated, or lost?

These are steps I took to fix it: