ScriptsApr 16, 2026·3 min read

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.

TL;DR
Reloader watches ConfigMaps and Secrets and triggers rolling restarts on Kubernetes workloads when configuration values change.
§01

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.

§02

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.

§03

How to use

  1. Install Reloader via Helm: helm repo add stakater https://stakater.github.io/stakater-charts && helm install reloader stakater/reloader.
  2. Add the annotation reloader.stakater.com/auto: 'true' to your Deployment, StatefulSet, or DaemonSet.
  3. Update a ConfigMap or Secret; Reloader automatically triggers a rolling restart of the annotated workload.
§04

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
§05

Related on TokRepo

§06

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

Does Reloader work with StatefulSets?+

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).

How does Reloader detect config changes?+

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.

Can I use Reloader with specific ConfigMaps only?+

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`.

Does Reloader cause downtime during restarts?+

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.

How do I install Reloader?+

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)

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets