Reloader — Auto-Restart Kubernetes Pods on Config Changes
Reloader watches ConfigMaps and Secrets, then triggers rolling restarts on Deployments, StatefulSets, and DaemonSets when values change.
What it is
Reloader is a Kubernetes controller that watches for changes in ConfigMaps and Secrets, then triggers rolling upgrades on associated Deployments, StatefulSets, and DaemonSets. By default, Kubernetes does not restart pods when a mounted ConfigMap or Secret changes; Reloader fills that gap.
Reloader is for Kubernetes operators and platform engineers who need configuration changes to take effect without manual pod restarts or redeployment pipelines.
How it saves time or tokens
Without Reloader, teams must either manually restart pods after config changes, build custom controllers, or use workarounds like changing annotation checksums in Helm charts. Reloader handles this automatically by computing a hash of the ConfigMap or Secret data and updating a pod annotation when the hash changes, which triggers the Kubernetes rolling update mechanism.
How to use
- Install Reloader via Helm:
helm repo add stakater https://stakater.github.io/stakater-charts && helm install reloader stakater/reloader. - Add the annotation
reloader.stakater.com/auto: 'true'to your Deployment, StatefulSet, or DaemonSet. - Update a ConfigMap or Secret; Reloader automatically triggers a rolling restart of the annotated workload.
Example
apiVersion: apps/v1
kind: Deployment
metadata:
name: my-app
annotations:
reloader.stakater.com/auto: 'true'
spec:
replicas: 3
template:
spec:
containers:
- name: app
image: my-app:latest
envFrom:
- configMapRef:
name: my-app-config
Related on TokRepo
- DevOps tools -- Kubernetes operational automation tools
- Automation tools -- infrastructure automation workflows
Common pitfalls
- Enabling Reloader on all workloads in a cluster without the annotation filter can cause unexpected rolling restarts during routine config changes.
- Reloader triggers restarts for any data change in the ConfigMap, including whitespace-only changes; be precise with config updates.
- In large clusters, Reloader's watch on all ConfigMaps and Secrets can consume significant API server resources; use namespace filtering.
Frequently Asked Questions
Yes. Reloader supports Deployments, StatefulSets, and DaemonSets. For StatefulSets, it triggers a rolling update following the StatefulSet's update strategy (typically RollingUpdate with ordered pod management).
Reloader watches ConfigMap and Secret resources via the Kubernetes API. When data changes, it computes a SHA hash of the content and updates an annotation on the associated workload. The changed annotation triggers Kubernetes built-in rolling update mechanism.
Yes. Instead of the auto annotation, you can use `configmap.reloader.stakater.com/reload: 'my-config-name'` to watch specific ConfigMaps. The same pattern works for Secrets with `secret.reloader.stakater.com/reload`.
No, if your Deployment has proper rolling update settings (maxUnavailable and maxSurge). Reloader triggers the standard Kubernetes rolling update, which respects your pod disruption budget and update strategy.
The recommended installation is via Helm: `helm repo add stakater https://stakater.github.io/stakater-charts` followed by `helm install reloader stakater/reloader`. You can also install via kubectl apply with the raw manifests from the GitHub releases page.
Citations (3)
- Reloader GitHub— Reloader watches ConfigMaps and Secrets for rolling restarts
- Stakater Helm Charts— Helm chart installation
- Kubernetes Documentation— Kubernetes rolling update mechanism
Related on TokRepo
Discussion
Related Assets
NAPI-RS — Build Node.js Native Addons in Rust
Write high-performance Node.js native modules in Rust with automatic TypeScript type generation and cross-platform prebuilt binaries.
Mamba — Fast Cross-Platform Package Manager
A drop-in conda replacement written in C++ that resolves environments in seconds instead of minutes.
Plasmo — The Browser Extension Framework
Build, test, and publish browser extensions for Chrome, Firefox, and Edge using React or Vue with hot-reload and automatic manifest generation.