In the fast-paced world of DevOps and cloud-native application development, managing configuration changes without downtime is one of the most persistent challenges. Every time you update a ConfigMap or a Secret in Kubernetes, you face the same question: How do I get my pods to pick up the new values without a manual restart?
Enter — a Kubernetes controller that has quietly become an essential tool for thousands of clusters worldwide. Available on GitHub, this open-source project automates rolling updates whenever your configuration resources change. reloader by r-1n github
In this article, we’ll dive deep into what Reloader is, how to install it from the official r-1n GitHub repository, configuration options, real-world use cases, and best practices. Reloader is a Kubernetes controller that watches for changes in ConfigMaps and Secrets . When it detects an update, it automatically performs a rolling upgrade on any associated Deployments, DaemonSets, StatefulSets, or Rollouts. In the fast-paced world of DevOps and cloud-native
:
| Annotation | Purpose | |------------|---------| | reloader.r-1n.io/reload-on-change: "true" | Reload the workload when ConfigMap/Secret it references changes. | | reloader.r-1n.io/watch-configmap/secret: "configmap-name,secret-name" | Only watch specific resources. | | reloader.r-1n.io/auto: "true" | Automatically reload even without explicit annotations (global setting). | Real-World Example Let’s walk through a practical scenario: Step 1: Create a ConfigMap apiVersion: v1 kind: ConfigMap metadata: name: app-config data: app.properties: | color=blue timeout=30s Step 2: Create a Deployment with the Reloader Annotation apiVersion: apps/v1 kind: Deployment metadata: name: my-app annotations: reloader.r-1n.io/reload-on-change: "true" spec: template: spec: containers: - name: app image: nginx volumeMounts: - name: config mountPath: /etc/config volumes: - name: config configMap: name: app-config Step 3: Update the ConfigMap kubectl edit configmap app-config # Change color=blue to color=green Within seconds, Reloader detects the change and triggers a rolling restart of my-app . The new pods mount the updated ConfigMap, and your application now reads color=green . Advanced Configuration Options Namespace Scoping By default, Reloader watches all namespaces. To restrict it: When it detects an update, it automatically performs
helm repo add reloader https://r-1n.github.io/reloader helm repo update helm install reloader reloader/reloader --namespace reloader --create-namespace Helm allows easy overrides, such as setting log level, watch namespace, or enabling auto-reload for all resources. Clone the repository and build using Go:
helm upgrade reloader reloader/reloader --set watchNamespace=production Add the following annotation to a workload to exclude it from auto-reload: