In my previous post, Working with kubernetes configmaps, part 1: volume mounts, I discussed the mechanisms for loading kubernetes configmaps from volume mounts within a container, and how the method used to create a configmap would translate into how the data would be presented.

In this post, I am going to discuss a specific strategy for handling configmaps, namely, using a watcher. Kubernetes API resources all support a watch feed, which allows API clients to monitor resources in which they are interested, be informed of changes, and then act accordingly (in whatever manner they wish). …

A couple of thoughts.

If you write applications to run on kubernetes, there’s at least a decent chance you’re passingly (or more) familiar with golang. Kubernetes is, after all written in go, and a lot of tools have sprung up around kubernetes/docker which are also written in go, and go has been gaining a great deal of traction in the broader cloud development community.

And if you write applications to run on kubernetes, there is a nearly 100% chance you are somewhat familiar with configmaps (and if you aren’t, how did you manage that).

Configmaps are essential to running applications…

Anyone storing critical data has to think about security. While you can rely on infrastructure and middleware to do some of the work (e.g encrypted filesystems and the like), application developers should not assume that such mechanisms are always in place (and should code as if they were not). To that end, many patterns have been developed to work with popular persistence frameworks — Ruby developers might define custom attribute accessors, while Java developers might follow a different set of patterns with e.g. JPA/Hibernate.

With the popularity of document-based/NoSQL databases, for which you cannot generally piggyback on relatively mature ORM…

Sandy Cash

Software engineer, cyclist, language nerd

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store