Skip to main content

KubeChain

KubeChain answers one question: is my Kubernetes blockchain deployment production ready?

It reads workloads, Services, Secrets, storage, network policy, and disruption settings. A live check uses get, list, and watch. Secret bytes are discarded. Volume snapshots are observed and never created. The cluster is left as it was found.

ValidatorPulse raises an alert. ChainDiff decides whether a client upgrade is safe. ChainTrace is the view of the process. KubeChain is the view of that same node as a Kubernetes workload.

Install

Python 3.11 or newer.

pip install kubechain
kubechain --version

The package is published from a GitHub release to PyPI. The one-page summary is on GitHub Pages. This README is the reference.

Commands

Question Command
Does this manifest set pass? check --manifests DIR
Does this namespace pass? check --namespace NS
One line for a journal? check --brief
Can I keep the answer? report

--manifests needs no cluster. --context NAME selects a kubeconfig context for a live read. The two modes are separate. --json prints one document. --brief and --json together print the JSON document only.

Examples

examples/ready is a geth and lighthouse pair that passes. examples/broken is the cases that are not ready. examples/oom is a saved pod status.

kubechain check --manifests examples/ready
kubechain check --manifests examples/broken
kubechain check --manifests examples/ready --brief
kubechain check --manifests examples/ready --profile examples/geth.json
kubechain report --manifests examples/ready
kubechain check --namespace nodes

report writes kubechain-report.md. --output PATH chooses the file. A directory is refused. An existing file is overwritten.

Verdicts

Verdict Exit When
READY 0 No warning or critical finding. An info line still exits 0.
REVIEW 1 A warning. The workload runs, and a production gap is named.
NOT READY 2 A critical finding. Chain data, a secret, or an upgrade would be unsafe.
ERROR 3 The manifests, the profile, or the cluster could not be read.

Every finding has an id, a severity, the object name, a reason, and an action. A check that cannot name an action does not emit a finding.

What a ready workload looks like

A chain node is a StatefulSet with a claim template, a headless Service, and a JWT mounted as a file. Probes survive a long sync. The disruption budget matches the replica count. A backup signal exists before the next rolling upgrade. A Deployment is for a stateless proxy, not for chain data.

A single replica is a warning. It runs, and it has no failover.

--manifests has no pod status and no kubelet stats. The report says restarts were not read, and storage performance was not read. That absence is not a finding. A live read reports OOMKilled, CrashLoopBackOff, and restart counts. Volume usage is reported when kubelet stats can be read. Above 80% is a warning. Above 95% is critical. When the stats endpoint is unavailable, the report says storage performance was not read.

Clients

The catalog recognizes geth, reth, nethermind, erigon, besu, op-geth, lighthouse, prysm, teku, nimbus, lodestar, op-node, and mev-boost. Each profile sets ports, the data volume, whether a JWT is required, and a floor for CPU, memory, storage, and shutdown grace. The floor is a KubeChain floor. The source line is in clients.json.

An unrecognized workload is still listed and is judged only by the generic Kubernetes checks. op-node is the consensus side for op-geth. mev-boost does not sync and does not hold chain data.

--profile FILE replaces the built-in profile when the container name matches comm. examples/geth.json is the sample.

{
  "comm": "geth",
  "p2p_ports": [30303],
  "rpc_ports": [8545, 8546],
  "engine_port": 8551,
  "jwt": true,
  "data_volume": "data",
  "cpu": "2",
  "memory": "8Gi",
  "storage": "100Gi",
  "grace_seconds": 300
}

An unknown field is exit 3.

Live read

deploy/kubechain-reader.yaml is a Role and a binding for the object kinds a live check reads. The verbs are get, list, and watch. Apply it yourself. KubeChain does not apply it.

kubectl apply -f deploy/kubechain-reader.yaml -n nodes

Listing a Secret returns its bytes from the API. The CLI discards them. The report prints the Secret name and the mount path.

The example is one namespace. A ClusterRole for more than one namespace is a comment in that file, not a second manifest.

StorageClass and kubelet volume stats are cluster-scoped. The Role comment says which extra rules those reads need. If they are not granted, the report says so and continues.

Development

pip install -e ".[dev]"
pytest

Metadata

Release files for kubechain 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kubechain 0.2.0
File Size Uploaded Provenance Actions
kubechain-0.2.0.tar.gz 50.8 kB With provenance Details for kubechain-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for kubechain 0.2.0
File Interpreter ABI Platform Actions
kubechain-0.2.0-py3-none-any.whl Python 3 none any Details for kubechain-0.2.0-py3-none-any.whl

Total release size: 76.4 kB

Release files / kubechain-0.2.0.tar.gz

Download URL kubechain-0.2.0.tar.gz
Size 50.8 kB
Tags Source
SHA-256 checksum
How to use checksums
80ed7f41b243245788118dcb740e06c8b898411c8c611d474660f2061657d4e6
BLAKE2b-256 checksum
How to use checksums
d8a423bb0e7f7b00cf6ffcbe097f83b9bf9ee4d0c93699fb06e3be3758c05f94
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 14, 2026.

Transparency log

Release files / kubechain-0.2.0-py3-none-any.whl

Download URL kubechain-0.2.0-py3-none-any.whl
Size 25.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
236ff05bbbe98123b86261ad5a8ef0ad0c15e77f8150363d2940d25e126c1987
BLAKE2b-256 checksum
How to use checksums
0b7c842fdd51b4aa2f2db5d87a199636d15ee1b1253b87a0bb4ac5b67c4c6a59
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 14, 2026.

Transparency log

Security for kubechain 0.2.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for kubechain-0.2.0.tar.gz

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 Nov 14, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page