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.
-
:material-code-braces: Api[T]
The generic
Api[ResourceType]class, namespace vs cluster scope, the Ellipsis sentinel, and thecreate_api()factory. -
:material-transit-connection-variant: Clients
BaseClientABC,create_client()auto-detection, and the difference betweenHttpxClientandAioHttpClient. -
:material-cog: Configuration
ClientConfiguration, auto-loading from kubeconfig or in-cluster pod environment, and exec credential providers. -
:material-source-branch: Subresources
The descriptor pattern, marker interfaces (
HasLogs,HasExec, …), and how mypy enforces subresource availability at compile time. -
:material-alert-circle: Exceptions
The full exception hierarchy from
KubexExceptiondown to HTTP-specific errors likeNotFoundandConflict.