Containers reconfiguration in real-time

7/28/2017

I have faced with following case and haven't found clear answer for me.

Preconditions:

  • I have kubernetes cluster
  • there are some options related to my application (for example debug_level=Error)
  • there are pods running and each of them uses configuration (ENV, mount path or cli args)
  • later I need to change value of some option (the same 'debug_level' Error -> Debug)

The Q is: how should I notify my Pods that configuration has changed?

Earlier we could just send HUP signal to the exact process directly or call systemctl reload app.service

What are the best practices for this use-case?

Thanks.

-- max.kondr
containers
kubernetes

2 Answers

7/28/2017

I think this is something you could achieve using sidecar containers. This sidecar container could monitor for changes in the configuration and send the signal to the appropiate process. More info here: http://blog.kubernetes.io/2015/06/the-distributed-system-toolkit-patterns.html

-- Javier Salmeron
Source: StackOverflow

7/28/2017

Tools like kubediff or kube-applier can compare your kubernetes YAML files, to what's running on the cluster.

-- Mark O'Connor
Source: StackOverflow