kubernetes-asyncio
Kubernetes Asynchronous Python Client
Decision gist · record as of 2026-08-14
Yes, if you need async Kubernetes API access in Python 3.10+. The library is actively maintained, has low install friction, carries no known vulnerabilities, and uses a permissive license. It is a direct fit for async-first applications; if your workload is synchronous or requires earlier Python versions, alternatives may be more suitable.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10+.
- On Windows with client-go credential plugins, ProactorEventLoop must be explicitly set via asyncio.set_event_loop_policy().
- Low install friction with a pure-Python wheel distribution.
License · maintenance · safety
Apache-2.0 (permissive) — Licensed under Apache-2.0 (permissive), allowing use in commercial and private projects with minimal restrictions beyond attribution and liability disclaimers.
last release 2026-06-04 (71 days)
0 known vulnerabilities (OSV.dev, 2026-08-14) · 21,434,572 downloads/mo, #1,002 on PyPI
Alternatives
Verify before relying
pip install kubernetes_asyncio
import asyncio
from kubernetes_asyncio import client, config
from kubernetes_asyncio.client.api_client import ApiClient
async def main():
await config.load_kube_config()
async with ApiClient() as api:
v1 = client.CoreV1Api(api)
ret = await v1.list_pod_for_all_namespaces()
for pod in ret.items:
print(pod.metadata.name)
asyncio.run(main())- Feature parity with the synchronous kubernetes client and which Kubernetes API versions are fully supported.
- Performance characteristics and concurrency limits when handling large numbers of simultaneous API requests.
- Whether all Kubernetes API endpoints are covered or if some operations require falling back to synchronous alternatives.
What it is and what it does
kubernetes_asyncio is an asynchronous Python client for the Kubernetes API, built using the OpenAPI generator to mirror the structure of the official synchronous client but with async/await support throughout. It allows developers to interact with Kubernetes clusters without blocking the event loop, making it suitable for concurrent operations like watching multiple resources, tailing pod logs, or orchestrating many API calls in parallel.
The library handles Kubernetes configuration loading, API client lifecycle management, and provides typed access to Kubernetes API groups. Dependencies include aiohttp for HTTP requests, pyyaml for config parsing, and standard utilities like certifi, urllib3, python-dateutil, and six. It targets modern Python versions and is versioned to align with Kubernetes release cycles.
Use it for
- Building event-driven Kubernetes operators or controllers that need to react to cluster changes without blocking.
- Concurrent pod log streaming or multi-resource watching from a single Python process.
- Orchestrating bulk Kubernetes operations with async concurrency without thread pools.
- Integrating Kubernetes API calls into async web frameworks or async task queues.
- Writing integration tests that need to poll Kubernetes state asynchronously while running other async tasks.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need async Kubernetes API access in Python 3.10+.
The library is actively maintained, has low install friction, carries no known vulnerabilities, and uses a permissive license. It is a direct fit for async-first applications; if your workload is synchronous or requires earlier Python versions, alternatives may be more suitable.
Install
kubernetes-asyncio on PyPI
Before you install
Low install friction with a pure-Python wheel distribution. Maintenance status is active with a recent release within 71 days. Requires Python 3.10 or later.
Requires Python 3.10+. On Windows with client-go credential plugins, ProactorEventLoop must be explicitly set via asyncio.set_event_loop_policy().
License in practice
Licensed under Apache-2.0 (permissive), allowing use in commercial and private projects with minimal restrictions beyond attribution and liability disclaimers.
Quickstart
pip install kubernetes_asyncio
import asyncio
from kubernetes_asyncio import client, config
from kubernetes_asyncio.client.api_client import ApiClient
async def main():
await config.load_kube_config()
async with ApiClient() as api:
v1 = client.CoreV1Api(api)
ret = await v1.list_pod_for_all_namespaces()
for pod in ret.items:
print(pod.metadata.name)
asyncio.run(main())
Verify before relying
- Feature parity with the synchronous kubernetes client and which Kubernetes API versions are fully supported.
- Performance characteristics and concurrency limits when handling large numbers of simultaneous API requests.
- Whether all Kubernetes API endpoints are covered or if some operations require falling back to synchronous alternatives.
Package facts
| License | Apache-2.0 permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 6 packagesaiohttpcertifipython-dateutilpyyamlsixurllib3 |
| Maintenance | Actively maintained 71 days since the last release |
| First released | |
| Downloads | 21,434,572 / month, #1,002 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersIntended Audience :: Information TechnologyLicense :: OSI Approved :: Apache Software LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Utilities |
Evidence: kubernetes_asyncio-36.1.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “kubernetes async client”
- kubernetes-asyncioAsynchronous Python client for the Kubernetes API, enabling…
- kr8sA Python client library for Kubernetes that mirrors kubectl's command…
- kubernetesProvides a Python interface to the Kubernetes API, enabling…
Give your agent the search over MCP, or paste the wish link into any chat.
More Utilities packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Detects and normalizes text encoding from unknown or ambiguous sources, supporting all IANA character sets that Python's core library provides codecs for, with the ability to register custom codecs.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
Pygments is a syntax highlighter that colorizes source code and text in over 500 languages and formats, outputting to HTML, LaTeX, RTF, SVG, images, or ANSI terminal sequences.
Install it if you need to display or transform source code.
Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.
See also kubernetes · openshift · kr8s · k8 · pykube-ng · portforward · caio · sqlite-anyio · eks-token · openshift-client