How kubernetes-client/python works
The Kubernetes Python Client lets applications configure cluster access, invoke Kubernetes APIs, and consume resource data through synchronous or asynchronous clients. Its principal workflow is configuration → API operations → HTTP transport → typed response. Additional capabilities include dynamic resource discovery, watches and informers, streaming, and YAML-based resource creation. The tree and excerpts support these boundaries, but several runtime files were not sampled; uncertain connections are therefore omitted rather than inferred.
Main entry points: client/api Sync API groups · client/api_client.py Sync API client · client/api Async API groups · client/api_client.py Async API client
Components 21
API clients
- Sync API groups
kubernetes/client/api - Sync API client
kubernetes/client/api_client.py - Sync HTTP transport
kubernetes/client/rest.py - Sync response
kubernetes/client/api_response.py - Async API groups
kubernetes/aio/client/api - Async API client
kubernetes/aio/client/api_client.py - Async response
kubernetes/aio/client/api_response.py - Async settings
kubernetes/aio/client/configuration.py
Runtime features
- Dynamic resources
kubernetes/dynamic/client.py - Resource discovery
kubernetes/dynamic/discovery.py - Resource operations
kubernetes/dynamic/resource.py - Watch streams
kubernetes/watch/watch.py - Informers
kubernetes/informer/informer.py - Informer cache
kubernetes/informer/cache.py - Exec streaming
kubernetes/stream/stream.py - YAML resources
kubernetes/utils/create_from_yaml.py
Typed data
- Sync models
kubernetes/client/models/v1_api_group.py - Async models
kubernetes/aio/client/models/v1_api_group.py
Configuration
- Cluster configuration
kubernetes/config - Async kube config
kubernetes/aio/config
Other components
- Python application
Connections 18
- Python application → Sync API groups: invokes
- Python application → Async API groups: invokes
- Python application → Cluster configuration: loads config
- Python application → Async kube config: loads config
- Sync API groups → Sync API client: calls
kubernetes/client/api/storagemigration_v1_api.py - Sync API client → Sync HTTP transport: uses transport
kubernetes/client/api_client.py - Sync API client → Sync response: builds response
kubernetes/client/api_client.py - Sync API groups → Sync models: serializes models
kubernetes/client/api/storagemigration_v1_api.py - Async API groups → Async API client: calls
kubernetes/aio/client/api/storagemigration_v1_api.py - Async API client → Async response: builds response
kubernetes/aio/client/api_client.py - Async API groups → Async models: uses models
kubernetes/aio/client/api/storagemigration_v1_api.py - Async API client → Async settings: reads settings
kubernetes/aio/client/api_client.py - Dynamic resources → Resource discovery: creates discoverer
kubernetes/dynamic/client.py - Dynamic resources → Resource operations: uses resources
kubernetes/dynamic/client.py - Informers → Watch streams: consumes events
kubernetes/informer/informer.py - Informers → Informer cache: updates cache
kubernetes/informer/informer.py - YAML resources → Dynamic resources: uses dynamic client
kubernetes/utils/create_from_yaml.py - Exec streaming → Sync HTTP transport: uses REST