---
title: "Kubernetes Informers are so easy... to misuse!"
description: "Kubernetes Informers report the eventual current state of an object, not every intermediate transition, so controllers must use level-driven logic rather than comparing oldObj and newObj in UpdateFunc."
url: "https://swe.quest/articles/kubernetes-informers-are-so-easy-to-misuse-a7aef41b2bdd46d8"
canonical: "https://render.com/blog/kubernetes-informers"
source: "Render"
published: "2025-08-26"
difficulty: "medium"
kind: "Deep dive"
reading_minutes: 7
tags: ["kubernetes","go","resilience","memory-management"]
---

# Kubernetes Informers are so easy... to misuse!

A post on [Render](https://swe.quest/sources/render.md), published 2025-08-26, 7 min read, Deep dive. Original: [https://render.com/blog/kubernetes-informers](https://render.com/blog/kubernetes-informers)

## Summary

Kubernetes Informers report the eventual current state of an object, not every intermediate transition, so controllers must use level-driven logic rather than comparing oldObj and newObj in UpdateFunc. Each handler processes events serially and buffers pending notifications in an unbounded ring buffer, so a slow handler facing a large initial LIST (around 10^5 items at Render) can trigger an "OOMLoop" in which the Pod is OOM-killed and restarted repeatedly. Render recommends keeping handlers fast or using a workqueue, reading from the Informer cache instead of the API, filtering with WithTweakListOptions label selectors, and trimming objects with SetTransform. SetTransform carries a debugging cost, because zeroed-out fields can confuse tools and future teammates.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Kubernetes](https://swe.quest/tags/kubernetes.md) (Infrastructure)
- [Go](https://swe.quest/tags/go.md) (Languages)
- [Resilience](https://swe.quest/tags/resilience.md) (Distributed systems)
- [Memory management](https://swe.quest/tags/memory-management.md) (Compilers & runtimes)

## Prerequisites

- Kubernetes controllers ([easy posts on Kubernetes](https://swe.quest/tags/kubernetes.md?difficulty=easy))
- Go channels and goroutines ([easy posts on Go](https://swe.quest/tags/go.md?difficulty=easy))
- Kubernetes API LIST/WATCH ([easy posts on Kubernetes](https://swe.quest/tags/kubernetes.md?difficulty=easy))

## Keywords

Kubernetes Informers, client-go, workqueue, SharedInformerFactory, SetTransform, Render

## Related posts

- [Node.js and the tale of worker threads](https://swe.quest/articles/node-js-and-the-tale-of-worker-threads-2f7f52d719f58af7.md): Zalando Engineering · 2024-07-24 · Medium · 10 min read · JavaScript, Kubernetes, Incidents & postmortems, Debugging, Observability
  A Node.js service using cluster mode called os.cpus().length inside a Kubernetes container, which returns the host's core count, not the pod's CPU allocation.
- [Thundering herd of circuit breakers](https://swe.quest/articles/thundering-herd-of-circuit-breakers-b2ab1d42eebffb68.md): Zalando Engineering · 2026-10-07 · Medium · 9 min read · Resilience, Incidents & postmortems, Observability, Kubernetes, Capacity planning
  A client's circuit breaker stayed open for hours because its half-open probes hit a service that the HPA had scaled down to three pods.
- [How the controller-runtime Cache Actually Works, and Why Your Controller Does Not Crash the API Server](https://swe.quest/articles/how-the-controller-runtime-cache-actually-works-and-why-your-controller-does-adcfa1b97b0265c0.md): Kubernetes Blog · 2026-07-29 · Hard · 32 min read · Kubernetes, Go, Caching
  In controller-runtime, r.Get() and r.List() inside a reconciler read from a local in-memory cache built on client-go informers.
- [How We Found 7 TiB of Memory Just Sitting Around](https://swe.quest/articles/how-we-found-7-tib-of-memory-just-sitting-around-a00b8a17b734c234.md): Render · 2025-10-30 · Medium · 7 min read · Kubernetes, Observability, Performance engineering, Cost optimization, Open source
  Render's Kubernetes clusters have an unusually large number of namespaces, and daemonsets that listwatch them, such as Vector's kubernetes\_logs source, used gigabytes of memory per node and put load on the apiserver during rollouts.
- [Our journey taking Kubernetes state metrics to the next level](https://swe.quest/articles/our-journey-taking-kubernetes-state-metrics-to-the-next-level-53c89d582db9c1aa.md): Datadog Engineering · 2021-10-15 · Medium · 12 min read · Kubernetes, Observability, Go, Performance engineering, Open source
  Datadog's Containers team made kube-state-metrics usable as a library: an upstream PR made the KSM Builder extensible so the MetricStore could be swapped out, with neutral-to-slightly-better benchmark results.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
