Skip to main content

petri

A real Kubernetes control plane inside go test.

The real API server

Upstream kube-apiserver code runs in your test process: validation, defaulting, admission, RBAC and strategic merge patch behave as on a cluster. No binaries to download, no Docker, nothing on disk.

Controllers and Nodes

Namespaces really go away and owners cascade. Turn on the workload controllers, add simulated Nodes, and run kube-scheduler or place Pods yourself with gomock-style expectations.

An envtest drop-in

Keep your controller-runtime suites: swap the envtest import for petri's drop-in and they run against an in-process control plane with no setup step in CI.