skillfed

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.

cdk8s v2.70.92 599.6K downloads/30d#5,826 on PyPI87
Permissive license Apache-2.0 Active released

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 cdk8s

uv

uv add cdk8s

poetry

poetry add cdk8s

Installing 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

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI ApprovedOperating System :: OS IndependentProgramming Language :: JavaScriptProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Typing :: Typed

Tags

kubernetes infrastructure as codedefine k8s manifests with pythonkubernetes cdk frameworkprogrammatic kubernetes deploymentkubernetes construct librarykubernetes yaml generationdeclarative k8s applications
kubernetesinfrastructure-as-codemanifests

More Build Tools packages