pyk8sdev
A development tool for creating Kubernetes clusters and syncing code changes to the cluster
This tool extends the functionality of pytest-kubernetes by adding support for caching container images, a CLI tool for spinning up a cluster during development, and support for automatically syncing changes to the cluster.
Features
- Creates Kubernetes clusters with container caching to speed up development cycles
- Watches for code changes and syncs changes to the cluster
- talosctl provider for pytest-kubernetes
- Provides pytest fixtures
- Standalone CLI tool
- Optional TUI tool
Only talosctl and kind providers have been tested
Installation
Install pyk8sdev for use as a pytest fixture or with the simple CLI in your project:
uv add pyk8sdev
To install the full TUI tool:
uv tool install "pyk8sdev[tui]"
Usage
Standalone CLI
pyk8sdev
As pytest plugin
from pyk8sdev import CachedK8sCluster
def test_cluster(cached_k8s_cluster: CachedK8sCluster):
nodes = cached_k8s_cluster.cluster.kubectl(["get", "nodes"])
assert len(nodes.get("items", [])) > 0
Configuration
Configuration is managed through .pyk8sdev.yaml in your project root:
cluster_name: test
provider: kind
api_version: 1.34.0
provider_config: tests/kind.yaml
containers:
- name: my-app
tag: latest
containerfile: Containerfile
directory: .
resources:
- source: |-
https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.4.1/standard-install.yaml
- name: cilium
namespace: kube-system
version: 1.19.1
repository_url: oci://quay.io/cilium/charts/cilium
values_override: |-
---
image:
pullPolicy: IfNotPresent
ipam:
mode: kubernetes
- source: tests/manifests.yaml
- name: my-app
directory: charts/my-app
values_file: tests/values.yaml
- command: /usr/local/bin/telepresence helm install
All relative paths are relative to the configuration file's directory. Containers are built before resources are applied. Containers and resources are applied in the order they are listed. A schema can be created to assist in managing the config using:
pyk8sdev --schema
The schema will have the same path and name as the config you provide, but with the .schema.json extension.
License
This project is licensed under the Apache-2.0 License - see the LICENSE file for details.
Contributing
PRs are welcome!
Metadata
Release files for pyk8sdev 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pyk8sdev-0.2.1.tar.gz | 33.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pyk8sdev-0.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 59.8 kB
Release files / pyk8sdev-0.2.1.tar.gz
| Download URL | pyk8sdev-0.2.1.tar.gz |
|---|---|
| Size | 33.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
be5209076d3d1ac59df45e91134412dbbba9a7736f8d3e5a600d29cb320e008a
|
|
BLAKE2b-256 checksum How to use checksums |
daf014ccb370e6ede40fdfa067ba07c35a8d551143bdb21310998c88d6a0685f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 12, 2026.
Transparency logRelease files / pyk8sdev-0.2.1-py3-none-any.whl
| Download URL | pyk8sdev-0.2.1-py3-none-any.whl |
|---|---|
| Size | 26.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6b70e36bc195ee491431dfa388000d8fd1e4a7e327aaaf97492366019a0ae821
|
|
BLAKE2b-256 checksum How to use checksums |
88078bcc846c98b9a3345185a911a33f63e19f4c7d82f26ace7d5cf821582595
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 12, 2026.
Transparency log