[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Logs from container app stored to local disk on nodes



Hi, 

Just wondering is it possible to have an app living in a container log back to the box the container lives on. 

Our test set up is as follows: 

All web apps identical
webapp1 > node1
webapp2 > node2
webapp3 > node3
webapp4 > node4

Ideally we'd like logs from the webapp inside a container on node1 to log to a dedicated logging partition on the host OS of node1 and so on for the other nodes. 
Ultimately we'd like the logs to persist beyond the life of the container I suppose. 

We've tried oc edit dc/webapp and specifying a volume to log to
oc volume dc/<webapp> --add --name=v1 --type=hostPath --path=/var/log/<webapp>

And then specifying that the webapp log to the above partition. 

However the webapp fails to deploy. I'll need to dig in to why that is, but in the meantime is this vaguely the correct way to go about logging?

Cheers, 
Ronan. 


P.S. I went to thank Scott Dodson and for help with a previous matter recently but for some reason the mail has not been received on the list. 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]