kubernetes-asyncio
Kubernetes Asynchronous Python Client
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
Asynchronous Python client for the Kubernetes API, enabling non-blocking interaction with Kubernetes clusters using AsyncIO.
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
pip
pip install kubernetes-asynciouv
uv add kubernetes-asynciopoetry
poetry add kubernetes-asyncioInstalling kubernetes-asyncio
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.
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())
Requires Python 3.10+. On Windows with client-go credential plugins, ProactorEventLoop must be explicitly set via asyncio.set_event_loop_policy().
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 — aiohttp, certifi, python-dateutil, pyyaml, six, urllib3 |
| 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) |
Evidence: kubernetes_asyncio-36.1.0-py3-none-any.whl
Tags
More Utilities packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
charset-normalizerDetects and normalizes text encoding from…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
PygmentsPygments is a syntax highlighter that colorizes…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
kubernetesProvides a Python interface to the Kubernetes…
permissive · top 1,000 on PyPI
openshiftPython client library for interacting with…
permissive · top 15,000 on PyPI
kr8sA Python client library for Kubernetes that…
permissive · top 5,000 on PyPI
k8Provides Python type models for Kubernetes…
permissive · top 15,000 on PyPI
pykube-ngpykube-ng is a Python client library for…
permissive · top 15,000 on PyPI
portforwardProvides Python bindings for Kubernetes…
permissive · top 15,000 on PyPI
caioProvides async file I/O for Python via multiple…
permissive · top 1,000 on PyPI
sqlite-anyioProvides an asynchronous client for SQLite that…
permissive · top 15,000 on PyPI
eks-tokenGenerates Kubernetes authentication tokens for…
unclear · top 15,000 on PyPI
openshift-clientProvides a Python API for interacting with…
permissive · top 15,000 on PyPI