cdk8s
This is the core library of Cloud Development Kit (CDK) for Kubernetes (cdk8s). cdk8s apps synthesize into standard Kubernetes manifests which can be applied to any Kubernetes cluster.
What it is and what it does
cdk8s is the core library of the Cloud Development Kit for Kubernetes, a framework that lets you write Kubernetes applications in Python instead of YAML. Rather than hand-editing manifest files, you define Kubernetes resources using object-oriented constructs—reusable, composable building blocks that can represent anything from a single Pod to a complete application stack. The library synthesizes your Python code into standard Kubernetes manifests that can be applied to any cluster.
The package depends on constructs, jsii, and publication. It targets modern Python versions (3.10 through 3.14) and is marked production-stable. It is part of a larger cdk8s ecosystem; this package is the programmatic core used by applications and higher-level tools.
Use it for:
- Define multi-environment Kubernetes deployments as Python code with shared logic and parameterization.
- Build reusable Kubernetes component libraries that teams can compose into larger applications.
- Generate Kubernetes manifests programmatically for templated or dynamic workloads.
- Integrate Kubernetes infrastructure definition into Python CI/CD pipelines and automation.
- Leverage IDE autocomplete and type checking when defining Kubernetes resources.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
cdk8s is a framework for defining Kubernetes applications using object-oriented Python code that synthesizes into standard Kubernetes manifests, allowing you to compose reusable constructs instead of writing YAML directly.
Yes, if you are building Kubernetes applications in Python and prefer code-based infrastructure definition. The package is actively maintained, has low install friction, carries no known vulnerabilities, and uses a permissive license. The main consideration is whether the constructs abstraction and jsii bridge fit your team's workflow.
Install
cdk8s on PyPI
pip
pip install cdk8suv
uv add cdk8spoetry
poetry add cdk8sInstalling cdk8s
Before you install
Low install friction with a pure Python wheel. Actively maintained with a release 1 day old; repository shows recent activity and is not archived. Three runtime dependencies are part of the standard ecosystem.
License in practice
Apache License 2.0 is permissive; you can use this package in commercial and proprietary projects without restriction, though you must include a copy of the license.
Quickstart
pip install cdk8s
from cdk8s import App, Chart
from constructs import Construct
app = App()
Chart(app, "my-chart")
app.synth()
Requires Python 3.10 or later.
Verify before relying
- Whether the jsii bridge adds meaningful overhead or complexity for Python users compared to alternatives.
- How well the constructs abstraction maps to real-world Kubernetes patterns beyond basic resource definition.
- Whether cdk8s-cli (the separate command-line tool) is required for practical use or if the core library alone suffices.
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — constructs, jsii, publication |
| Maintenance | actively maintained — 1 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 599,636/month — #5,826 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: cdk8s-2.70.92-py3-none-any.whl
Tags
More Build Tools packages
Provides reusable utilities for Python…
permissive · top 100 on PyPI
tqdmWraps any iterable to display a real-time…
copyleft · top 100 on PyPI
pippip is the standard installer for Python…
permissive · top 100 on PyPI
hatchlingHatchling is a standards-compliant Python build…
permissive · top 100 on PyPI
grpcio-toolsGenerates Python gRPC service stubs and message…
permissive · top 1,000 on PyPI
pre-commitpre-commit is a framework for installing and…
permissive · top 1,000 on PyPI
aws-cdk.aws-cloudformationDefines AWS CloudFormation resources…
permissive · top 15,000 on PyPI
aws-cdk.assetsProvides Python bindings for AWS CDK asset…
permissive · top 15,000 on PyPI
aws-cdk-libProvides Python APIs to define and deploy AWS…
permissive · top 5,000 on PyPI
kopfKopf is a Python framework for building…
permissive · top 5,000 on PyPI
lightkube-modelsProvides Python type definitions and model…
permissive · top 15,000 on PyPI
epik8s-toolsAutomates project structure, Helm chart, and…
permissive · top 15,000 on PyPI
aws-cdk.coreProvides the core construct classes and stack…
permissive · top 15,000 on PyPI
k8Provides Python type models for Kubernetes…
permissive · top 15,000 on PyPI
aws-cdk.aws-samProvides AWS CDK v1 constructs for defining…
permissive · top 15,000 on PyPI
cdktfDefines cloud infrastructure using Python code…
copyleft · top 15,000 on PyPI