Skip to main content

ConfigMaps

Time Taken For ConfigMap Update

The time it takes for Kubernetes to update a ConfigMap and reflect the changes in the pod depends on a few factors:

1. Kubelet Sync Period (default 1 minute)

Kubelet checks ConfigMaps based on the syncFrequency setting in the KubeletConfiguration file, which by default occurs every minute.

2. TTL of ConfigMaps Cache (default 1 minute)

Kubelet uses a TTL-based cache to store the current value of the ConfigMap locally, with a default TTL of 1 minute.

⏳ Maximum Update Delay

The maximum delay from the moment a ConfigMap is updated to the moment the changes are reflected in the pod can be:

Kubelet Sync Period(1 minute)+TTL of ConfigMaps Cache(1 minute)=2 minutes

⏱️ Minimum Update Delay

In the best-case scenario, if the ConfigMap is updated just before Kubelet’s next sync cycle:

Minimum Delay=0 minutes (if the sync happens immediately after the update)

🚀 How to Force Immediate Update?

To force an immediate update and bypass the cache delay you can update one of the pod's annotations.

This triggers Kubelet to refresh the ConfigMap immediately.