kubernetes
Kubernetes python client
Decision gist · record as of 2026-08-14
Yes. This is the official, actively maintained Kubernetes Python client with low install friction, a permissive license, no known vulnerabilities, and strong community adoption (top 1000 PyPI packages). Install it if you need to manage or query Kubernetes clusters from Python—it is the standard choice for this task.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires a valid kubeconfig file or in-cluster service account credentials to authenticate with a Kubernetes cluster.
- Low install friction with a pure-Python wheel distribution.
- Actively maintained with a recent release (32 days ago) and strong repository signals (7648 stars, last commit 2026-08-14).
License · maintenance · safety
Apache License Version 2.0 (permissive) — Licensed under Apache License Version 2.0 (permissive), allowing commercial use, modification, and distribution with minimal restrictions—suitable for most production and proprietary projects.
last release 2026-07-13 (32 days) · last repo commit 2026-08-14 · 7,648 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 114,242,045 downloads/mo, #312 on PyPI
Alternatives
Verify before relying
pip install kubernetes
from kubernetes import client, config
config.load_kube_config()
v1 = client.CoreV1Api()
pods = v1.list_pod_for_all_namespaces(watch=False)
for pod in pods.items:
print(pod.metadata.name, pod.status.pod_ip)- Whether all 10 runtime dependencies (certifi, six, python-dateutil, pyyaml, websocket-client, requests, requests-oauthlib, urllib3, durationpy, aiohttp) are truly required for basic usage or if some are optional.
- Performance characteristics and memory footprint when managing large clusters or handling high-frequency API calls.
What it is and what it does
The Kubernetes Python client is the official SDK for interacting with Kubernetes clusters programmatically. It auto-generates API bindings from the Kubernetes OpenAPI specification, providing typed access to all Kubernetes resources (pods, deployments, services, etc.) and operations. The package supports both synchronous (via requests) and asynchronous (via aiohttp) workflows, allowing developers to query cluster state, create and modify resources, watch for changes, and stream events.
The client handles authentication (kubeconfig files, service accounts, OAuth), connection pooling, and API versioning. It follows semantic versioning aligned with Kubernetes releases—version 36.0.3 targets Kubernetes 1.36 with compatibility for 1.35 and below. It is widely used in automation tools, operators, CI/CD pipelines, and infrastructure-as-code frameworks that need to manage Kubernetes resources from Python.
Use it for
- Automate pod deployment, scaling, and lifecycle management in CI/CD pipelines or GitOps workflows.
- Monitor cluster health by listing and watching resources, polling pod status, and streaming events.
- Build Kubernetes operators or controllers that react to resource changes and enforce custom logic.
- Integrate Kubernetes management into Python applications or dashboards that need programmatic cluster access.
- Write integration tests that provision temporary resources and verify cluster behavior.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
This is the official, actively maintained Kubernetes Python client with low install friction, a permissive license, no known vulnerabilities, and strong community adoption (top 1000 PyPI packages). Install it if you need to manage or query Kubernetes clusters from Python—it is the standard choice for this task.
Install
kubernetes on PyPI
Before you install
Low install friction with a pure-Python wheel distribution. Actively maintained with a recent release (32 days ago) and strong repository signals (7648 stars, last commit 2026-08-14). Requires Python 3.10 or later.
Requires a valid kubeconfig file or in-cluster service account credentials to authenticate with a Kubernetes cluster.
License in practice
Licensed under Apache License Version 2.0 (permissive), allowing commercial use, modification, and distribution with minimal restrictions—suitable for most production and proprietary projects.
Quickstart
pip install kubernetes
from kubernetes import client, config
config.load_kube_config()
v1 = client.CoreV1Api()
pods = v1.list_pod_for_all_namespaces(watch=False)
for pod in pods.items:
print(pod.metadata.name, pod.status.pod_ip)
Verify before relying
- Whether all 10 runtime dependencies (certifi, six, python-dateutil, pyyaml, websocket-client, requests, requests-oauthlib, urllib3, durationpy, aiohttp) are truly required for basic usage or if some are optional.
- Performance characteristics and memory footprint when managing large clusters or handling high-frequency API calls.
Package facts
| License | Apache License Version 2.0 permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 10 packagescertifisixpython-dateutilpyyamlwebsocket-clientrequestsrequests-oauthliburllib3durationpyaiohttp |
| Maintenance | Actively maintained 32 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 114,242,045 / month, #312 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-36.0.3-py2.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 › “k8s cluster management python”
- kubernetesProvides a Python interface to the Kubernetes API, enabling…
- kubernetes-asyncioAsynchronous Python client for the Kubernetes API, enabling…
- kr8sA Python client library for Kubernetes that mirrors kubectl's command…
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-asyncio · kr8s · portforward · pykube-ng · pycti · pulumi-kubernetes · openshift-client · argo-workflows · pyhelm3 · eks-token