patterndockerMinor
Change docker container’s log PATH
Viewed 0 times
pathcontainerlogdockerchange
Problem
Team:
All my container logs are under /var/log/containers..
Where in kubelet or docker config can I specify this path such that logs are instead created under new path?
Ex : /shared ? Instead of /var/log
All my container logs are under /var/log/containers..
Where in kubelet or docker config can I specify this path such that logs are instead created under new path?
Ex : /shared ? Instead of /var/log
Solution
I got a work around to this case. basically, My root volume is 100GB and I created a separate partition out of it as 70GB and I set it to a new device sda3 and mounted it to /var/lib.
now, all docker container logs are written in same path but in backend they are mounted to a different drive. with this setup, even if there is disk pressure, the node does not become unavailable.
so my drive now looks liek below
now, all docker container logs are written in same path but in backend they are mounted to a different drive. with this setup, even if there is disk pressure, the node does not become unavailable.
so my drive now looks liek below
sda1
sda2 / 30GB
sda3 /var/lib 70GB. << new deviceCode Snippets
sda1
sda2 / 30GB
sda3 /var/lib 70GB. << new deviceContext
StackExchange DevOps Q#12996, answer score: 1
Revisions (0)
No revisions yet.