Python type stubs for the Kubernetes API client. The code has been forked from MaterializeInc/kubernetes-stubs.
At Kialo, we only have a single Kubernetes version in use at each time. For a simplified release process, we release new stubs versions only for that version. See tags for available list.
pip install git+https://github.com/kialo/kubernetes_asyncio-stubs.git@v29.0.1
Alternatively, declare it as a dependency in your pyproject.toml
.
poetry:
[tool.poetry.dependencies]
kubernetes-asyncio-stubs = { rev = "29.0.1", git = "https://github.com/kialo/kubernetes_asyncio-stubs" }
uv:
[tool.uv]
dev-dependencies = [
"kubernetes_asyncio-stubs @ git+https://github.com/kialo/kubernetes_asyncio-stubs.git@29.0.1",
]
Remember to change the version number accordingly.
Dev dependencies are currently only pinned via uv's lock file. You can upgrade them via:
uv sync --upgrade
These stubs are not complete, and in some cases may be incorrect.
Annotations for base files are stored under codegen/base/
.
To (re-) generate the stubs for a (new) version of the Kubernetes API client, run:
- Update
kubernetes_asyncio
submodule to target release - Update version in
pyproject.toml
- Generate API models:
uv run --only-dev codegen ${target-version}
- Commit changes
- Release new tag:
git tag v${version}; git push v${version}