The Pulse
Google plans Kubernetes Python client upgrades for AI workloads
Google Cloud engineers and open-source contributors are modernizing the official Kubernetes Python client. Their roadmap includes native asynchronous support, resource caching and changes to code generation.

Google Cloud engineers and open-source contributors are working on native asynchronous calls, resource caching and faster data processing for the official Kubernetes Python client as part of a modernization aimed at AI and machine-learning workloads. In a November 12 post, Google outlined a roadmap for the client rather than a completed release.
The work is underway with contributors in Kubernetes SIG API Machinery. The client connects Python applications to Kubernetes, which the post describes as infrastructure for scheduling accelerators, coordinating distributed training and scaling model-serving endpoints.
Replacing an aging generator
Google says the client is downloaded more than 73 million times a month on PyPI, yet had been in low-maintenance mode for several years. Rather than reproduce every feature of the Kubernetes Go client, the team says it is concentrating on capabilities needed by Python developers and operators, with AI and machine-learning workloads guiding its priorities.
Through Kubernetes 1.35, the Python client generated approximately 400,000 lines of API and model code using OpenAPI Generator v4.3.0 and its python-legacy templates. That generator was deprecated in 2020 and removed from the upstream project in May 2022.
The team is working to migrate to OpenAPI Generator v7.20.0 or later and to track future upstream releases. The planned upgrade would also modernize type annotations and packaging metadata and allow fixes to performance and serialization to be contributed to upstream templates, according to Google.
Concurrency and cluster monitoring
The roadmap calls for native asyncio support in the official client. Until now, users seeking asynchronous execution have relied on community or third-party clients such as kubernetes-asyncio, kr8s and lightkube.
Google says native support will allow orchestrators, model control planes and notebooks to make concurrent, non-blocking Kubernetes API calls. Another planned addition is Shared Informers, a pattern for maintaining an event-driven local cache of cluster resources.
The proposed implementation includes list-watch caching, automatic reconnection and handlers for resource events. Google says it would let Python controllers and AI job managers monitor cluster state and custom resources with a fraction of the memory footprint and API server load.
The team is also adding native WebSocket v5 channel support for remote command streaming. The work follows Kubernetes' transition of operations such as exec, attach and port-forward from SPDY to WebSockets.
Large-cluster performance
The performance work targets the processing of large JSON responses, including lists of pods across training clusters. In large clusters, listing pods or nodes could take 30 or more seconds in Python because of repeated model reconfiguration during deserialization, according to the post.
The legacy model layer repeatedly creates and reconfigures schema-validation objects when processing those responses. As part of the generator migration, the team plans to change model initialization; Google says the aim is to reduce the time needed to deserialize large-cluster queries.
The effort is being developed in the open, and the team is seeking feedback, use cases and contributions. It points developers to the client and code-generation repositories and to the Kubernetes Python client triage meetings.