A full-featured Python SDK for Kubernetes
Project description
kube-orchestrator
A full-featured Python SDK for Kubernetes — programmatic kubectl, GitOps engine, platform engineering SDK.
Table of Contents
- Features
- Installation
- Quick Start
- Architecture
- Supported Resources
- Documentation
- Contributing
- License
- Acknowledgements
Features
- Full Kubernetes resource coverage — Pods, Deployments, StatefulSets, DaemonSets, Jobs, CronJobs, and more
- Programmatic kubectl — apply, delete, get, list, patch any resource from Python
- GitOps engine — load and apply YAML/JSON manifests with full validation
- Manifest Renderer — lightweight Helm-like templating engine
- Auto Rollback — detect failures and roll back deployments automatically
- Scaling Engine — HPA management and custom scaling watchers
- RBAC management — Roles, ClusterRoles, Bindings, ServiceAccounts
- Network management — Services, Ingress, NetworkPolicies, Endpoints
- Storage management — ConfigMaps, Secrets, PVs, PVCs, StorageClasses
- CRD Framework — install and manage Custom Resource Definitions
- CLI DevOps Tool —
kube-orchcommand for terminal workflows - Fully typed — PEP 561 compliant, works with mypy and pyright
- Python 3.10+ — modern Python, full type hints
Installation
pip install kube-orchestrator
Quick Start
from kube_orchestrator import KubeClient, PodManager
# Connect to cluster
client = KubeClient.from_kubeconfig()
# List all pods in a namespace
pod_manager = PodManager(client)
pods = pod_manager.list(namespace="default")
for pod in pods:
print(pod.name, pod.status.phase)
from kube_orchestrator import KubeClient, DeploymentManager
client = KubeClient.from_kubeconfig()
deploy_manager = DeploymentManager(client)
# Scale a deployment
deploy_manager.scale(name="my-app", namespace="default", replicas=5)
from kube_orchestrator import KubeClient, ManifestApplier
client = KubeClient.from_kubeconfig()
applier = ManifestApplier(client)
# Apply a manifest file (like kubectl apply -f)
applier.apply_file("manifests/deployment.yaml")
from kube_orchestrator import KubeClient, AutoRollback
client = KubeClient.from_kubeconfig()
rollback = AutoRollback(client)
# Watch a deployment and auto-rollback on failure
rollback.watch(name="my-app", namespace="default", timeout=300)
from kube_orchestrator import KubeClient, ClusterHealthReporter
client = KubeClient.from_kubeconfig()
reporter = ClusterHealthReporter(client)
# Get a full cluster health report
report = reporter.full_report()
print(report.summary())
Architecture
kube-orchestrator
├── core/ # KubeClient, KubeConfig, logging, errors
├── resources/
│ ├── workloads/ # Pod, Deployment, StatefulSet, DaemonSet, Job, CronJob
│ ├── networking/ # Service, Ingress, NetworkPolicy, Endpoints
│ ├── storage/ # ConfigMap, Secret, PV, PVC, StorageClass
│ ├── rbac/ # Role, ClusterRole, Bindings, ServiceAccount
│ └── cluster/ # Namespace, Node, HPA, ResourceQuota, LimitRange
├── manifest/ # Loader, Validator, Renderer, Applier
├── crd/ # CRD installer and custom object manager
├── monitoring/ # ClusterHealthReporter
├── rollback/ # AutoRollback system
├── scaling/ # ScalingEngine, ResourceWatcher
└── cli/ # kube-orch CLI tool
Supported Resources
| Resource | List | Get | Create | Update | Delete | Patch |
|---|---|---|---|---|---|---|
| Pod | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| Deployment | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| StatefulSet | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| DaemonSet | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| ReplicaSet | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| Job | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| CronJob | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| Service | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| Ingress | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| NetworkPolicy | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| ConfigMap | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| Secret | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| PersistentVolume | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| PersistentVolumeClaim | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| StorageClass | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| Namespace | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| Node | ✅ | ✅ | — | ✅ | — | ✅ |
| Role / ClusterRole | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| RoleBinding / ClusterRoleBinding | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| ServiceAccount | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| HPA | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| ResourceQuota | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| CRD | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
Documentation
Full documentation, including the API reference and guides, lives in the
docs/ folder — start at docs/index.md.
Contributing
Contributions are welcome! Please read CONTRIBUTING.md before submitting a PR.
License
This project is licensed under the MIT License — see LICENSE for details.
Acknowledgements
- kubernetes-client/python — official Kubernetes Python client
- kubectl — inspiration for the CLI design
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file kube_orchestrator-1.0.0.tar.gz.
File metadata
- Download URL: kube_orchestrator-1.0.0.tar.gz
- Upload date:
- Size: 209.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1dc9f48350e050e6a0884978c901a96147b33757b2cf4650b5bab554faa5a0c5
|
|
| MD5 |
fde7b00865feb20a4442d6367277291a
|
|
| BLAKE2b-256 |
da2f16c5bca81ef4923bde4d3626d219ae23b4e93210932ae6803b383774d3fd
|
Provenance
The following attestation bundles were made for kube_orchestrator-1.0.0.tar.gz:
Publisher:
release.yml on AbbesCheriif/kube-orchestrator
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
kube_orchestrator-1.0.0.tar.gz -
Subject digest:
1dc9f48350e050e6a0884978c901a96147b33757b2cf4650b5bab554faa5a0c5 - Sigstore transparency entry: 2072625323
- Sigstore integration time:
-
Permalink:
AbbesCheriif/kube-orchestrator@a33f13ef2128cac2add240e6fd3c5894992b88f5 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/AbbesCheriif
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@a33f13ef2128cac2add240e6fd3c5894992b88f5 -
Trigger Event:
push
-
Statement type:
File details
Details for the file kube_orchestrator-1.0.0-py3-none-any.whl.
File metadata
- Download URL: kube_orchestrator-1.0.0-py3-none-any.whl
- Upload date:
- Size: 137.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d7ec2b6b5ac287ee0525ea08bf81aceddf9caafadd12ccda393bd3bbec59f8d5
|
|
| MD5 |
70f90450e2fd81a9cab343d560ff1370
|
|
| BLAKE2b-256 |
ccd37fa0a5db94e092161967abeb9aa7d84b8cc96da742184f1b57346af6c67a
|
Provenance
The following attestation bundles were made for kube_orchestrator-1.0.0-py3-none-any.whl:
Publisher:
release.yml on AbbesCheriif/kube-orchestrator
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
kube_orchestrator-1.0.0-py3-none-any.whl -
Subject digest:
d7ec2b6b5ac287ee0525ea08bf81aceddf9caafadd12ccda393bd3bbec59f8d5 - Sigstore transparency entry: 2072625358
- Sigstore integration time:
-
Permalink:
AbbesCheriif/kube-orchestrator@a33f13ef2128cac2add240e6fd3c5894992b88f5 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/AbbesCheriif
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@a33f13ef2128cac2add240e6fd3c5894992b88f5 -
Trigger Event:
push
-
Statement type: