Concepts¶
This section explains the core design patterns behind Kubex. Read these pages to understand why the library is structured the way it is before diving into the operation and subresource guides.
-
The generic
Api[ResourceType]class, namespace vs cluster scope, the Ellipsis sentinel, and thecreate_api()factory. -
BaseClientABC,create_client()auto-detection, and the difference betweenHttpxClientandAioHttpClient. -
ClientConfiguration, auto-loading from kubeconfig or in-cluster pod environment, and exec credential providers. -
The descriptor pattern, marker interfaces (
HasLogs,HasExec, …), and how mypy enforces subresource availability at compile time. -
The full exception hierarchy from
KubexExceptiondown to HTTP-specific errors likeNotFoundandConflict.