Back to Devoured - May 08, 2026
DEVOURED
Kubernetes v1.36: Server-Side Sharded List and Watch

Kubernetes v1.36: Server-Side Sharded List and Watch

DevOps Kubernetes
Kubernetes v1.36 introduces server-side sharded list and watch as an alpha feature, allowing API servers to filter events at the source and send only relevant resource slices to horizontally-scaled controller replicas, significantly reducing network, CPU, and memory overhead.
What: This alpha feature (KEP-5866) in Kubernetes v1.36 lets controller replicas specify a hash range using a shardSelector field in ListOptions, such as shardRange(object.metadata.uid, '0x00...0', '0x80...0'). The API server then computes a 64-bit FNV-1a hash and only sends objects whose hash falls within the specified range, replacing inefficient client-side filtering.
Why it matters: This feature directly addresses the scaling challenges of Kubernetes controllers in large clusters, moving resource-intensive filtering from clients to the API server to improve efficiency, reduce network bandwidth, and enable more cost-effective scaling of controller replicas.
Takeaway: If you develop Kubernetes controllers for large clusters, consider experimenting with the ShardedListAndWatch feature gate in Kubernetes v1.36+ to optimize resource consumption for your horizontally scaled controllers.
Decoder
  • High-cardinality resources: Resources in Kubernetes like Pods where there can be a very large number of instances, leading to significant data volume.
  • Client-side sharding: A previous approach where each controller replica receives the full stream of events and then filters out the objects it is not responsible for, leading to wasted CPU, memory, and network resources.
  • Server-side sharding: The new approach where the Kubernetes API server filters events at the source before sending them to controller replicas, ensuring each replica only receives its assigned slice of resources.
  • ListOptions: A struct in the Kubernetes API used to specify parameters for listing resources, now including the shardSelector field.
  • FNV-1a hash: A non-cryptographic hash function used by the API server to deterministically assign objects to shards based on fields like object.metadata.uid.
  • Informer: A client-go component commonly used by Kubernetes controllers to list resources once and then watch for subsequent changes, maintaining an in-memory cache.
Original article

Kubernetes v1.36 introduced server-side sharded list and watch as an alpha feature that lets API servers filter events at the source, sending each horizontally-scaled controller replica only its assigned slice of resources instead of the full stream.

Explore all 68 articles in today's digest

Fresh dev news, AI-digested daily. Never miss a trend at devoured.fyi