Advanced¶
This section covers advanced topics for production use and deeper integration.
-
Multi-version Kubernetes
Use separate model packages (
kubex-k8s-1-32throughkubex-k8s-1-37) to target specific cluster versions, or mix versions in a single application. -
Custom Resources
Define Pydantic models for your CRDs and use
Api[T]for full CRUD and status subresource support — no code generation required. -
Clients & Runtimes
Choose between
aiohttp(faster, asyncio-only) andhttpx(asyncio + trio), and understand the WebSocket support matrix forexec,attach, andportforward. -
Authentication
Configure kubeconfig-based, in-cluster, and exec-provider authentication. Learn how
create_client()auto-detects the right method. -
Benchmarks
Performance comparison against
kubernetes-asyncio: latency, memory, and allocations across list, watch, and streaming scenarios, with instructions to reproduce results.