How to perform a filewatch in kubernetes

12/21/2018

We need to perform a file watch on a container and trigger a script once the file is available.

Anyone who have come across this kind of requirement pls assist. Thankyou

-- Ram
kubernetes
kubernetes-pod

1 Answer

12/21/2018

We use a https://hub.docker.com/r/weaveworks/watch/ container as a side car to watch for changes in a file and then trigger a reload of a process when a config file changes.

The README says Watches for changes in a directory tree... so this should also trigger an event when a new file is created and you should be able to use this for your purposes.

-- Oliver
Source: StackOverflow