--- id: kubernetes-asyncio version: "36.1.0" license: Apache-2.0 license_treatment: permissive maintenance: active --- # kubernetes-asyncio — Kubernetes Asynchronous Python Client License: permissive · Maintenance: active · Downloads: 21.4M/mo ## 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 above — 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 pip install kubernetes-asyncio uv add kubernetes-asyncio poetry add kubernetes-asyncio ## Installing 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_current - Install friction: low - Maintenance: active - Downloads: 21.4M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags kubernetes async client, asyncio kubernetes api, non-blocking k8s python, kubernetes async python library, async kubernetes cluster management, kubernetes coroutine client, async k8s api wrapper, async-io, kubernetes, container-orchestration [View on SkillFed](https://skillfed.io/packages/kubernetes-asyncio) · [View on PyPI](https://pypi.org/project/kubernetes-asyncio/)