Restart StatefulSet on file modification

4/28/2020

I have a StatefulSet deployed on EKS. Pods have a shared EFS volume mounted. The shared mount has a configuration file.

I need a mechanism to watch for any changes made to the configuration file. If there is a change, I want to automatically trigger a restart of the StatefulSet.

Is this something that I can achieve in Kubernetes without having to build a custom application? Can I use Kubernetes Operators for something like this, if so how?

-- Santosh Kewat
kubectl
kubernetes
kubernetes-operator
kubernetes-statefulset

0 Answers