I have a native Kubernetes version v1.28.5 installed on Debian. I use it as test env. Looks like i have quite a lot log files and images from previous helm charts.
How I can clean old log files and images which are no longer used?
I have a native Kubernetes version v1.28.5 installed on Debian. I use it as test env. Looks like i have quite a lot log files and images from previous helm charts.
How I can clean old log files and images which are no longer used?
2
Answers
after going through many of the articles ,here is some language and ref which might be helpful for you.
1st understand the following.
also read the log-location-node
as far as i know kubernetes does not directly manage log files.
as you have not specified but if you are using docker as the container runtime
then you can use the docker logs command
docker container logs [OPTIONS] CONTAINER
to view and manage container logs from here you can then delete the log files manuallyor use a log rotation mechanism to automatically clean up old log files.
also you might want to go through clear-a-pods-log-in-kubernetes
Images can removed using
docker image prune -a
Reference:- https://docs.docker.com/engine/reference/commandline/image_prune/